Open lucazav opened 3 years ago
Those are rather good suggestions, split_groups_by
would be also easily applicable to make_violin
, and perhaps a similar logic could be applied to make_density
and make histogram
.
Regarding coord_flip on rainclouds, however, it will be quite troublesome since a key aspect of chronicle's functions is perfect feature parity between static ggplot2 plots and their plotly counterparts. All plots are translated through plotly::ggplotly
, and raincloud plots are traditionally made with ggdist, whose geoms are not currently supported by ggplotly's translator engine. This means that I had to manually build each element of the raincloud segment by segment through geom_segment and the like. Applying coord_flip after the entire plot is done does not work, so this will necessitate a rather large workaround.
It would be really useful to enrich the
make_raincloud()
function to provide a parameter to flip the coordinates of the plot (vertical rainclouds grouped along the horizontal axis) and another one to pass a set of variables to define the facet groups (like thesplit_groups_by
for boxplots).