From ee68798de3ab92aa8897c295abc8b37e9a45b204 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Mon, 25 Jul 2016 15:40:28 -0400 Subject: [PATCH] add back single function recipe; closes #401 --- src/plot.jl | 2 +- src/series.jl | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/plot.jl b/src/plot.jl index b6027656..aa42bd7a 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -148,7 +148,7 @@ end # a list of series KW dicts. # note: at entry, we only have those preprocessed args which were passed in... no default values yet function _plot!(plt::Plot, d::KW, args::Tuple) - # d[:plot_object] = plt + d[:plot_object] = plt # -------------------------------- # "USER RECIPES" diff --git a/src/series.jl b/src/series.jl index b2ab68b2..f3df4afb 100644 --- a/src/series.jl +++ b/src/series.jl @@ -273,14 +273,15 @@ end end end -# -# -# # function without range... use the current range of the x-axis -# @recipe function f(f::FuncOrFuncs) -# plt = d[:plot_object] -# f, xmin(plt), xmax(plt) -# end + +# function without range... use the current range of the x-axis + +@recipe function f(f::FuncOrFuncs) + plt = d[:plot_object] + xmin,xmax = axis_limits(plt[1][:xaxis]) + f, xmin, xmax +end # # # --------------------------------------------------------------------