Reputation: 85
I cannot seem to get a second line no matter how I try to work it with the "\n" operator. I want some text, "TEST" to be on the second line. Any ideas how to make this work?
ytitle <- expression(bold(paste("Chlorophyll", italic(" a "), "(",mu, gL^-1,")", "\n TEST")))
ggplot(mtcars, aes(x=wt, y=mpg)) +
geom_point(size=2, shape=23) + labs(y=ytitle)
Upvotes: 0
Views: 433
Reputation: 85
My solution is here, thanks!
ggplot(mtcars, aes(x=wt, y=mpg)) +
geom_point(size=2, shape=23) + labs(y=expression(atop(paste("Chlorophyll", italic(" a "), "(",mu, gL^-1,")"), "TEST")))
Upvotes: 0
Reputation: 11
You can use atop()
atop("above", "below")
Change your ytitle to this.
ytitle <- expression(bold(atop(paste("Chlorophyll", italic(" a "), "(",mu, gL^-1,")"), "\n TEST")))
Upvotes: 1