JuliaPlots / RecipesPipeline.jl

Utilities for processing recipes
http://juliaplots.org/RecipesPipeline.jl/dev/
MIT License
17 stars 17 forks source link

Grouping issues #33

Closed mkborregaard closed 4 years ago

mkborregaard commented 4 years ago

There's something amiss with the grouping functionality. MWE: And this is trying to get GroupedBar to work:

recipeplot(StatsPlots.GroupedBar((rand(10,3))), bar_position = :stack, bar_width=0.7)

gives

ERROR: MethodError: no method matching grouped_xy(::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64)
Stacktrace:
 [1] macro expansion at /Users/michael/.julia/packages/StatsPlots/Y1rGZ/src/bar.jl:11 [inlined]
 [2] apply_recipe(::Dict{Symbol,Any}, ::StatsPlots.GroupedBar) at /Users/michael/.julia/packages/StatsPlots/T6b05/src/bar.jl:16
 [3] _process_userrecipes!(::Scene, ::Dict{Symbol,Any}, ::Tuple{StatsPlots.GroupedBar}) at /Users/michael/.julia/dev/RecipesPipeline/src/user_recipe.jl:32
 [4] recipe_pipeline! at /Users/michael/.julia/dev/RecipesPipeline/src/RecipesPipeline.jl:66 [inlined]
 [5] #tomakie!#17 at /Users/michael/.julia/dev/MakieRecipes/src/MakieRecipes.jl:15 [inlined]
 [6] tomakie(::StatsPlots.GroupedBar; attrs::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:bar_position, :bar_width),Tuple{Symbol,Float64}}}) at /Users/michael/.julia/dev/MakieRecipes/src/MakieRecipes.jl:21
 [7] top-level scope at none:0
asinghvi17 commented 4 years ago

Can confirm, this is still an issue.

asinghvi17 commented 4 years ago

Oh - I think you forgot to wrap in a tuple. That was missing a comma.

recipeplot(StatsPlots.GroupedBar((rand(10,3),)), bar_position = :stack, bar_width=0.7)

groupedbar

mkborregaard commented 4 years ago

Sweet :-O 🤯