When I have multiple categorical variables in the x axis of a spineplot (base R graphics), I often find that some of my labels are missing. Is there a way to make the x axis labels vertical? Or better yet, is there an easy way to make spineplots using ggplot. I know I can do variable width stacked barcharts but they seem to be a pain to make these and even more of a pain to get the variable width bars close together. Although spineplots are nice and easy, I'd like to have more control in how they look.
Reproducible example:
spineplot(factor(mpg$drv)~factor(mpg$manufacturer),
xlab = "Manufacturer", ylab = "Wheel Drive")
#mpg comes from library(ggplot2)
Here I have 15 manufacturers but ten labels. I'd also like to have some color.
I have found these posts, but I do not find the solutions to be particularly easy
How to make variable bar widths in ggplot2 not overlap or gap