I have a geom_boxplot
to which I would like to a second set of labels to each of the axis labels below the axis. In normal plots barplots (with plot
), I would use the arguments:
par(xpd=T)
text(c("a", "b", "c", "d"), x=c(0.7, 1.9, 3.1, 4.3),
y=0, pos=1, offset=0.13)
Here's a sample graph using the mgp
data showing the labels that I could want to add below the axis labels (but it is currently within the graph):
p <- ggplot(mpg, aes(class, hwy))
p + geom_boxplot()+
annotate("text", x = c(1:7), y=-10, label = paste(1:7*10, "mpg"), cex=3)