diff --git a/src/args.jl b/src/args.jl index 87b1fbc4..6b7bebb1 100644 --- a/src/args.jl +++ b/src/args.jl @@ -252,6 +252,7 @@ const _suppress_warnings = Set{Symbol}([ :subplot_index, :series_plotindex, :link, + :plot_object, ]) # add defaults for the letter versions diff --git a/src/plot.jl b/src/plot.jl index d5f0cd72..78343281 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -231,6 +231,8 @@ function _plot!(plt::Plot, d::KW, args...) # _update_subplot_args(plt, sp, d, idx) # end + d[:plot_object] = plt + # the grouping mechanism is a recipe on a GroupBy object # we simply add the GroupBy object to the front of the args list to allow # the recipe to be applied diff --git a/src/series_new.jl b/src/series_new.jl index 31351ed0..80439292 100644 --- a/src/series_new.jl +++ b/src/series_new.jl @@ -270,7 +270,10 @@ end # process_inputs(plt, d, f, xmin(plt), xmax(plt)) # end -@recipe f(f::FuncOrFuncs) = f, xmin(plt), xmax(plt) +@recipe function f(f::FuncOrFuncs) + plt = d[:plot_object] + f, xmin(plt), xmax(plt) +end # # # --------------------------------------------------------------------