I\'m trying to add panel labels to different facets in a plot. I want them to be 1:7, but, the following code
d <- ggplot(diamonds, aes(carat, price, fil
With annotate, you can't. But by setting up a data.frame and using it as the data source for a geom_text, it is easy (with a few bookkeeping aspects).
annotate
data.frame
geom_text
d1 + geom_text(data=data.frame(x=0.25, y=1.5e+04, label=1:7, color=c("D","E","F","G","H","I","J")), aes(x,y,label=label), inherit.aes=FALSE)