I am trying to point a small arrow on x-axis at point 10. This arrow is vertically pointing downwards. I am unable to do so using the following code. What more is required here?
data = data.frame(rnorm(1000))
colnames(data) = "numOfX"
m <- ggplot(data, aes(x=numOfX))
m + geom_histogram(colour = "blue", fill = "white", binwidth = 0.5) +
annotate("segment", x=10,xend=10,y=0,yend=0,arrow=arrow())
Is this what you’re trying to do?