I am trying to add plot labels as titles in plots merged by ggarrange. My label contains parantheses and substricpts. I have found that using expression('My volume [m'^3*'/ha]') I can handle both, which works perfectly if placed as x or y label (ylab(expression('My volume [m'^3*'/ha]'))).
However, when using the same approach using ggarrange to combine different plots, and wishing to name them a) and b), the naming prints quotes as well:
How can I correctly write the expression, or using paste('..', '..') approach that quotes are not visible?
Dummy example to create several plots and plot them using ggarrange:
p1 <- ggplot(cars, aes(x=speed, y=dist)) + geom_point() + geom_smooth()
p2 <- p1
ggarrange(p1, p2,
nrow = 2, ncol = 1,
common.legend = TRUE,
legend="bottom",
labels=list(paste("a) ", 'My rate [%]'),
paste('b)', expression('My volume [m'^3*'/ha]'))), # How to change this???
align = c("hv"),
font.label = list(size = 10,
face = "plain",
color ="black"))
Wrong labeled output b:


