I get an error when I try exactly this example, and I wonder if you have any clues as to why, or what I should vary to narrow this down.
I pasted the above inside a module, with using RecipesBase
and without using Plots
. In the REPL I load Plots and then my module, then define the fake data as above. And I get an error like so:
julia> simplot(sims)
ERROR: UndefVarError: grid not defined
Stacktrace:
[1] macro expansion at /Users/me/.julia/v0.6/RI/src/plotrecipes.jl:378 [inlined]
[2] apply_recipe(::Dict{Symbol,Any}, ::RI.SimPlot) at /Users/me/.julia/v0.6/RecipesBase/src/RecipesBase.jl:265
[3] _process_userrecipes(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{RI.SimPlot}) at /Users/me/.julia/v0.6/Plots/src/pipeline.jl:81
[4] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{RI.SimPlot}) at /Users/me/.julia/v0.6/Plots/src/plot.jl:175
[5] #simplot#101(::Array{Any,1}, ::Function, ::Array{Float64,2}, ::Vararg{Array{Float64,2},N} where N) at /Users/me/.julia/v0.6/RecipesBase/src/RecipesBase.jl:341
[6] simplot(::Array{Float64,2}, ::Vararg{Array{Float64,2},N} where N) at /Users/me/.julia/v0.6/RecipesBase/src/RecipesBase.jl:341
If I add using Plots
to the module then it works as expected, but if I understand right the point of this is to avoid that.
I was trying with layout := @layout [ left right{0.6w} ]
before, and there too got errors unless I had using Plots
in the module.