In a plot made with the ggplot2 package I want to put a subtitle with a part of the text in bold and the other in plain fonts. Also, I would like to make 2 lines of text.
So far I've been trying with the expression() and bold() functions, and the \n; but I can't get the expected result:
Item 1: Text
Item 2: Text
library(ggplot2)
ggplot(data = mpg,
aes(x = cyl,
y = year)) +
geom_point() +
labs(subtitle = expression(bold("Item 1:")*" Text\n"*bold("Item 2:")*" Text"))

