Add _recipe_before_series

This commit is contained in:
Sebastian Micluța-Câmpeanu 2020-03-14 21:27:12 +02:00 committed by Simon Christ
parent 857d37c380
commit bb08d61709
2 changed files with 14 additions and 3 deletions

View File

@ -23,7 +23,8 @@ import RecipeUtils: _process_userrecipes, _process_plotrecipe,
preprocessArgs!, is_st_supported,
recipe_pipeline!,
_recipe_init!, _recipe_after_user!,
_recipe_after_plot!, _recipe_finish!
_recipe_after_plot!, _recipe_before_series!,
_recipe_finish!
using Requires

View File

@ -155,7 +155,7 @@ function plot!(plt::Plot, args...; kw...)
plotattributes = KW(kw)
preprocessArgs!(plotattributes)
# merge!(plt.user_attr, plotattributes)
recipe_pipeline!(plt, plotattributes, args)
recipe_pipeline!(plt, plotattributes, args, _typeAliases=_typeAliases)
end
# -------------------------------------------------------------------------------
@ -174,7 +174,7 @@ function _recipe_init!(plt::Plot, plotattributes::AKW, args::Tuple)
end
end
function _recipe_after_plot!(plt::Plot, plotattributes::AKW, args::Tuple)
function _recipe_after_plot!(plt::Plot, plotattributes::AKW, kw_list::Vector{KW})
# --------------------------------
# Plot/Subplot/Layout setup
# --------------------------------
@ -182,6 +182,16 @@ function _recipe_after_plot!(plt::Plot, plotattributes::AKW, args::Tuple)
_subplot_setup(plt, plotattributes, kw_list)
end
function _recipe_before_series!(plt::Plot, kw, kw_list)
sp::Subplot = kw[:subplot]
# in series attributes given as vector with one element per series,
# select the value for current series
_slice_series_args!(kw, plt, sp, series_idx(kw_list,kw))
series_attr = Attr(kw, _series_defaults)
end
function _recipe_finish!(plt::Plot, plotattributes::AKW, args::Tuple)
current(plt)