Skip to content
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

Plotting union with seriestype kwarg fails #2678

Closed
mforets opened this issue Apr 26, 2021 · 1 comment
Closed

Plotting union with seriestype kwarg fails #2678

mforets opened this issue Apr 26, 2021 · 1 comment
Labels
fix 🤕 Fix to a problem that is not too serious plots 🎨 Related to plotting

Comments

@mforets
Copy link
Member

mforets commented Apr 26, 2021

The following used to work probably changed after #2653 :

L1 = LineSegment([3.3, -1.3], [3.7, -1.3])
L2 = LineSegment([3.3, 1.5], [3.7, 1.5])
L3 = LineSegment([3.3, -1.3], [3.3, 1.5])
L4 = LineSegment([3.7, -1.3], [3.7, 1.5])

U = UnionSetArray([L1, L2, L3, L4])
plot(U, color=:black, style=:dash, lw=1.5, seriestype=:solid, marker=:none, alpha=1.)

The backend must not support the series type Val{:solid}, and there isn't a series recipe defined.

Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] macro expansion
    @ ~/.julia/packages/RecipesPipeline/CirY4/src/type_recipe.jl:9 [inlined]
  [3] apply_recipe(plotattributes::AbstractDict{Symbol, Any}, #unused#::Type{Val{:solid}}, x::Any, y::Any, z::Any)
    @ RecipesPipeline ~/.julia/packages/RecipesBase/92zOw/src/RecipesBase.jl:282
  [4] _process_seriesrecipe(plt::Any, plotattributes::Any)
    @ RecipesPipeline ~/.julia/packages/RecipesPipeline/CirY4/src/series_recipe.jl:50
  [5] _process_seriesrecipes!(plt::Any, kw_list::Any)
    @ RecipesPipeline ~/.julia/packages/RecipesPipeline/CirY4/src/series_recipe.jl:27
  [6] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)
    @ RecipesPipeline ~/.julia/packages/RecipesPipeline/CirY4/src/RecipesPipeline.jl:97
  [7] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)
    @ Plots ~/.julia/packages/Plots/SVksJ/src/plot.jl:172
  [8] #plot#144
    @ ~/.julia/packages/Plots/SVksJ/src/plot.jl:58 [inlined]
  [9] top-level scope
    @ In[35]:7
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:1094
@mforets mforets added fix 🤕 Fix to a problem that is not too serious plots 🎨 Related to plotting labels Apr 26, 2021
@schillic
Copy link
Member

The following used to work probably changed after #2653

Confirmed, it worked before, but simply because we used a different plot recipe. I think this is a drawback in the plotting backend. As far as I can tell, the same result can be produced by omitting seriestype=:solid, marker=:none now.

plot(U, color=:black, style=:dash, lw=1.5, alpha=1.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 🤕 Fix to a problem that is not too serious plots 🎨 Related to plotting
Projects
None yet
Development

No branches or pull requests

2 participants