tags:

views:

82

answers:

1
+2  A: 

You can provide the points directly to geom_point():

set.seed(1000)
x = rnorm(1000)
g = ggplot(as.data.frame(x), aes(x = x))
g + stat_bin() + geom_point(data = data.frame(x = -1, y = 40), aes(x=x,y=y))

alt text

Greg
Hi Greg. Thank you, but unfortunately this doesn't work with <pre><code>stat_contour()</code></pre>. I get the error: <pre>Error in eval(expr, envir, enclos) : object 'z' not found</pre> basically asking for a Z coordinate. Any other ideas? Thanks!
Harold
Since the contour is 3 dimensional, your point will need a z component in order that the plotting package knows where to draw it.
Greg