I am trying to set the axis labels and bold in ggplot, but the y axis labels are not bold. Please suggest what should I add to the script. The following is a reproducible example. I need the βatopβ command to set the y-axis label string, as in the example below.
Thanks in advance.
library(ggplot2) chart <- ggplot(diamonds, aes(x = table, fill = clarity)) + geom_histogram() + scale_x_continuous('Month') + scale_y_continuous(expression(atop('ET (W'~m^-2~')'))) chart<-chart+theme(axis.title.y = element_text(colour="grey20",size=20,face="bold"), axis.text.x = element_text(colour="grey20",size=20,face="bold"), axis.text.y = element_text(colour="grey20",size=20,face="bold"), axis.title.x = element_text(colour="grey20",size=20,face="bold")) print(chart)
source share