Open tlnagy opened 6 years ago
Are there any recent developments in this regard? Especially interested in the split violins.
This PR needs quite a bit of work since we went through the whole 1.0 revamp since then. I'll eventually get to it if no one gets to it first. Bit swamped right now.
As discussed in #1151,
Gadfly.jl
's current implementation of violin plots (and to a lesser extent, density plots) is fairly limited as compared to our equivalent ecosystems for other languages (e.g. seaborn's violins and ggplot's violins).Current limitations
[ ] Not possible to change orientation of violinplots. The primary grouping currently has to be on the x axis so violins cannot be horizontal.
[ ] Major duplication of code between
Stat.density
andStat.violin
ggplot2
is able to build on the same code.[ ] Not possible to stack densities
:identity
: what we do now (2):stack
stack densities on top of each other like we do inGeom.bar
(3):fill
normalize such that for each position along the densities, the total always equals 1[ ] Not possible to adjust scaling of density plots, i.e. all Gadfly violins/density plots always have an area of 1. It would help to add the option of using unnormalized counts.
[ ] Currently impossible to group violins according to a 2nd variable (e.g. group by
color
andx
)x
categorical variable) then use the solution in #1081, (3) if there isn't a 1 to 1 mapping and fewer colors than x groupings then also use solution #1081 (4) group by primary variable, then by color (allowing split violins).[ ] Several inefficiencies with the code (we could do quite a bit of preallocation that we don't do related to the KDE since we know how many datapoints there will be in advance)
Examples
Fill
ed densities