-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] using RecipesBase: @recipe
is broken
#4557
Comments
Do you have a reproducer at hand ? What is exactly failing ? Please describe as if I were a 5 y.o. |
I copied this from https://github.com/JuliaPlots/Plots.jl/tree/master/RecipesBase julia> module M
using RecipesBase: @recipe
struct T end
@recipe f(::T) = rand(100,100)
end
Main.M
julia> using Plots
julia> surface(M.T())
ERROR: UndefVarError: RecipesBase not defined
Stacktrace:
[1] apply_recipe(plotattributes::AbstractDict{Symbol, Any}, #unused#::Main.M.T)
@ Main.M ~/.julia/packages/RecipesBase/6AijY/src/RecipesBase.jl:298
[2] _process_userrecipes!(plt::Any, plotattributes::Any, args::Any)
@ RecipesPipeline ~/.julia/packages/RecipesPipeline/XxUHt/src/user_recipe.jl:38
[3] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)
@ RecipesPipeline ~/.julia/packages/RecipesPipeline/XxUHt/src/RecipesPipeline.jl:72
[4] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)
@ Plots ~/.julia/packages/Plots/YbrTT/src/plot.jl:223
[5] plot(args::Any; kw::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
@ Plots ~/.julia/packages/Plots/YbrTT/src/plot.jl:102
[6] surface(args::Any; kw::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
@ Plots ~/.julia/packages/RecipesBase/6AijY/src/RecipesBase.jl:428
[7] surface(args::Any)
@ Plots ~/.julia/packages/RecipesBase/6AijY/src/RecipesBase.jl:428
[8] top-level scope
@ REPL[5]:1
The unqualified symbol RecipesBase appears in the macroexpansion of |
Thanks, I see we'd have to think of a fix (as maybe initiated in #4559) or enhancing documentation indeed. |
The output of
@recipe
assumes thatRecipesBase
is loaded. This makesusing RecipesBase: @recipe
not work. Ideally, it should work, failing that, documenting the limitation would be nice.The text was updated successfully, but these errors were encountered: