Open hbsmith opened 6 days ago
Yes the dodge effect isn't implemented yet for Geom.violin
, and we're happy to see PRs! A possible workaound is:
plot(salaries, x=:Rank, y=:Salary, color=:Rank,
xgroup=:Discipline,
Geom.subplot_grid(Geom.violin),
Scale.xgroup(levels=["Discipline A", "Discipline B"]),
Guide.xlabel(nothing)
)
I'm trying to make violin plot versions of the boxplots which are displayed as p2 here: https://gadflyjl.org/stable/gallery/geometries/#[Geom.boxplot](@ref)
My expectation is that
:color
in a violin plot would would like it does in a boxplot, but it does not. If I want to plot two different categories using a violin plot, where both categories have the same x-axis, it does not work. I'd expect it to apply dodge to the datasets. After digging, it seems like there is no option to even have violin plot dodge.Basically, I want to make the same kind of plot that seaborn demonstrates here: https://seaborn.pydata.org/generated/seaborn.violinplot.html
sns.violinplot(data=df, x="class", y="age", hue="alive")
Is there a way to do this that I'm not aware of?