turn extra_kwargs into Dict of Dicts

This commit is contained in:
Simon Christ 2020-03-18 17:29:06 +01:00
parent 6744917e69
commit 25f3fa6b2d
3 changed files with 3 additions and 5 deletions

View File

@ -281,7 +281,6 @@ const _series_defaults = KW(
# one logical series to be broken up (path and markers, for example)
:hover => nothing, # text to display when hovering over the data points
:stride => (1,1), # array stride for wireframe/surface, the first element is the row stride and the second is the column stride.
:extra_kwargs => KW(),
)

View File

@ -158,10 +158,9 @@ end
# --------------------------------------------------------------------------------------
function pgf_series(sp::Subplot, series::Series)
function pgf_series(sp::Subplot, series::Series, extra_series_kwargs)
plotattributes = series.plotattributes
st = plotattributes[:seriestype]
extra_kwargs = plotattributes[:extra_kwargs]
series_collection = PGFPlots.Plot[]
# function args
@ -540,7 +539,7 @@ function _update_plot_object(plt::Plot{PGFPlotsBackend})
# add the series object to the PGFPlots.Axis
for series in series_list(sp)
push!.(Ref(o), pgf_series(sp, series))
push!.(Ref(o), pgf_series(sp, series, plt[:extra_kwargs][:series]))
# add series annotations
anns = series[:series_annotations]

View File

@ -341,7 +341,7 @@ function _expand_subplot_extrema(sp::Subplot, plotattributes::AKW, st::Symbol)
end
function _add_the_series(plt, sp, plotattributes)
plotattributes[:extra_kwargs] = warnOnUnsupported_args(plt.backend, plotattributes)
plt[:extra_kwargs][:series] = warnOnUnsupported_args(plt.backend, plotattributes)
warnOnUnsupported(plt.backend, plotattributes)
series = Series(plotattributes)
push!(plt.series_list, series)