title: Plotting the poisson distribution using ggplot2's stat_function
body: <p>I would like to plot discrete probability distributions (like the poisson distribution) using ggplot2.</p>
  
  <p>I was able to plot it without using ggplot2 like this. </p>
  
  <pre><code>plot( dpois( x=0:20, lambda=1 ), type="b")
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/5WOBB.png" alt="enter image description here"></p>
  
  <p>And, I was able to plot continuous probability distributions using ggplot2 like this.</p>
  
  <pre><code>ggplot(data.frame(x=c(-10,10)), aes(x)) + stat_function(fun=dnorm, args=list(0, 1))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Scnvt.png" alt="enter image description here"></p>
  
  <p>And the code I tried was:</p>
  
  <pre><code>ggplot(data.frame(x=c(0:10)), aes(x)) + stat_function(geom="point", fun=dpois, args=list(1))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/6zow5.png" alt="enter image description here"></p>
  
  <p>In ggplot2, How do I plot discrete probability distributions like first one?</p>