5
I’m having trouble formatting species names in italics in the title of the panels with the argument facet_wrap
in the ggplot2
. Following example:
library(ggplot2)
ggplot(mpg, aes(x=displ, y=hwy)) +
geom_point() +
geom_smooth(method="lm", se=FALSE, colour="black") +
facet_wrap(~ trans)
In this example we have as a result 10 panels, each with a title, which are the variables in my original data table. How to put these titles in italics?
Thanks a lot, Marcus! Even asking the question here, I kept trying to find out, and I had already thought that the way would be through strip.text, I just hadn’t got the code formatting right.... Thank you very much!!
– Rafael Arruda
It’s great to know that my response has helped you in some way. So consider vote and accept the answer, so that in the future other people who experience the same problem have a reference to solve it.
– Marcus Nunes