From 85f91b90751f546b2ece240decb89769dc7e0ae0 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Wed, 1 Jun 2016 14:45:35 -0500 Subject: [PATCH] fix for plotting function; closes #291 --- src/args.jl | 1 + src/plot.jl | 2 ++ src/series_new.jl | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) 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 # # # --------------------------------------------------------------------