I have a long caption that I would like to include at the bottom of a ggplot geom_boxplot.
Currently the code writes a single line to the caption with lots of the intended caption missing. How might I wrap the text in the caption?
My code is
p = ggplot(mpg, aes(class, hwy)) + geom_boxplot() +
labs(title="An example title", caption = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
I have experimented with a few things but have got nowhere e.g. plot.caption in the theme of the ggplot. Could anyone help?
Thank you. Phil,

