All I want to do is put the word "alpha" at the position (-2.5, 0.2) on this graph, and I can't figure out what is causing the error.
library(ggplot2)
myx <- seq(-4,4,0.01)
myy <- dnorm(myx)
df <- as.data.frame(cbind(myx,myy))
ggplot(df,aes(myx,myy)) + geom_point() + annotate("text",x=-2.5,y=0.2,"alpha")
All I get is:
Error: Discrete value supplied to continuous scale
I have found many complex discussions of this particular error message, but none related to so simple a case as mine, and none relating to annotate.
Many thanks for any help.