ggplot2: How to customize the labels of a ggmosaic plot?
Using ggplot2 and ggmosaic, I am generating a facet_grid of mosaic plots using R’s built-in HairEyeColor dataset. And trying to add labels using the geom_mosaic_text argument. But adding a “color=” argument to geom_mosaic_text() has no effect. Am I doing something wrong? Or is there another way to do this?
How do I prevent ggplotly from altering the label formatting of a ggmosaic facet_grid?
I’m passing a ggplot2
ggmosaic
facet_grid
to plotly
and when I do plotly messes up the formatting of the facet_grid. Plotly overrides the theme() setting in ggplot and adds a legend, replaces the axis labels with ‘x’ and ‘y’ and messes up the alignment of the text in facet grid plot labels. Is there some parameter in either facet_grid()
or plotly()
I can adjust to prevent this?