make bar workign
This commit is contained in:
parent
5361a5a55f
commit
e73f880a11
@ -675,6 +675,15 @@ end
|
|||||||
# these methods track the discrete (categorical) values which correspond to axis continuous values (cv)
|
# these methods track the discrete (categorical) values which correspond to axis continuous values (cv)
|
||||||
# whenever we have discrete values, we automatically set the ticks to match.
|
# whenever we have discrete values, we automatically set the ticks to match.
|
||||||
# we return (continuous_value, discrete_index)
|
# we return (continuous_value, discrete_index)
|
||||||
|
function discrete_value!(plotattributes, letter::Symbol, dv)
|
||||||
|
l = if plotattributes[:series_permutation] !== :none
|
||||||
|
only(filter(!=(letter), plotattributes[:series_permutation]))
|
||||||
|
else
|
||||||
|
letter
|
||||||
|
end
|
||||||
|
discrete_value!(plotattributes[:subplot][get_attr_symbol(l, :axis)], dv)
|
||||||
|
end
|
||||||
|
|
||||||
function discrete_value!(axis::Axis, dv)
|
function discrete_value!(axis::Axis, dv)
|
||||||
cv_idx = get(axis[:discrete_map], dv, -1)
|
cv_idx = get(axis[:discrete_map], dv, -1)
|
||||||
if cv_idx == -1
|
if cv_idx == -1
|
||||||
|
|||||||
@ -438,7 +438,7 @@ end
|
|||||||
procx, procy, xscale, yscale, baseline = _preprocess_barlike(plotattributes, x, y)
|
procx, procy, xscale, yscale, baseline = _preprocess_barlike(plotattributes, x, y)
|
||||||
nx, ny = length(procx), length(procy)
|
nx, ny = length(procx), length(procy)
|
||||||
axis = plotattributes[:subplot][isvertical(plotattributes) ? :xaxis : :yaxis]
|
axis = plotattributes[:subplot][isvertical(plotattributes) ? :xaxis : :yaxis]
|
||||||
cv = [discrete_value!(axis, xi)[1] for xi in procx]
|
cv = [discrete_value!(plotattributes, :x, xi)[1] for xi in procx]
|
||||||
procx = if nx == ny
|
procx = if nx == ny
|
||||||
cv
|
cv
|
||||||
elseif nx == ny + 1
|
elseif nx == ny + 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user