update series attributes after processing series recipes
This commit is contained in:
parent
49f4773e81
commit
1f3c4948c6
39
src/args.jl
39
src/args.jl
@ -1473,26 +1473,19 @@ function _replace_linewidth(d::KW)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function _add_defaults!(d::KW, plt::Plot, sp::Subplot, commandIndex::Int)
|
function _add_defaults!(d::KW, plt::Plot, sp::Subplot, commandIndex::Int)
|
||||||
pkg = plt.backend
|
|
||||||
globalIndex = d[:series_plotindex]
|
|
||||||
|
|
||||||
# add default values to our dictionary, being careful not to delete what we just added!
|
# add default values to our dictionary, being careful not to delete what we just added!
|
||||||
for (k,v) in _series_defaults
|
for (k,v) in _series_defaults
|
||||||
slice_arg!(d, d, k, v, commandIndex, false)
|
slice_arg!(d, d, k, v, commandIndex, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
# this is how many series belong to this subplot
|
return d
|
||||||
# plotIndex = count(series -> series.d[:subplot] === sp && series.d[:primary], plt.series_list)
|
end
|
||||||
plotIndex = 0
|
|
||||||
for series in sp.series_list
|
|
||||||
if series[:primary]
|
function _update_series_attributes!(d::KW, plt::Plot, sp::Subplot)
|
||||||
plotIndex += 1
|
pkg = plt.backend
|
||||||
end
|
globalIndex = d[:series_plotindex]
|
||||||
end
|
plotIndex = _series_index(d, sp)
|
||||||
# plotIndex = count(series -> series[:primary], sp.series_list)
|
|
||||||
if get(d, :primary, true)
|
|
||||||
plotIndex += 1
|
|
||||||
end
|
|
||||||
|
|
||||||
aliasesAndAutopick(d, :linestyle, _styleAliases, supported_styles(pkg), plotIndex)
|
aliasesAndAutopick(d, :linestyle, _styleAliases, supported_styles(pkg), plotIndex)
|
||||||
aliasesAndAutopick(d, :markershape, _markerAliases, supported_markers(pkg), plotIndex)
|
aliasesAndAutopick(d, :markershape, _markerAliases, supported_markers(pkg), plotIndex)
|
||||||
@ -1562,3 +1555,19 @@ function _add_defaults!(d::KW, plt::Plot, sp::Subplot, commandIndex::Int)
|
|||||||
_replace_linewidth(d)
|
_replace_linewidth(d)
|
||||||
d
|
d
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function _series_index(d, sp)
|
||||||
|
idx = 0
|
||||||
|
for series in series_list(sp)
|
||||||
|
if series[:primary]
|
||||||
|
idx += 1
|
||||||
|
end
|
||||||
|
if series == d
|
||||||
|
return idx
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if get(d, :primary, true)
|
||||||
|
idx += 1
|
||||||
|
end
|
||||||
|
return idx
|
||||||
|
end
|
||||||
|
|||||||
@ -398,6 +398,7 @@ function _process_seriesrecipe(plt::Plot, d::KW)
|
|||||||
sp = _prepare_subplot(plt, d)
|
sp = _prepare_subplot(plt, d)
|
||||||
_prepare_annotations(sp, d)
|
_prepare_annotations(sp, d)
|
||||||
_expand_subplot_extrema(sp, d, st)
|
_expand_subplot_extrema(sp, d, st)
|
||||||
|
_update_series_attributes!(d, plt, sp)
|
||||||
_add_the_series(plt, sp, d)
|
_add_the_series(plt, sp, d)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user