title: Need smoothed line on histogram. Why does geom_density draw two lines?
body: <p>I have an issue with my histogram on top of which I want to add a smoothed line, preferably a polynomial smooth.</p>
  
  <p>The closest I got was adding a smoothed <code>geom_density</code>, or <code>geom_line</code> with <code>stat="density"</code> with additional adjust option.</p>
  
  <p>In any case, I am getting two lines for my density, also when using the simplified code below. Why is that? I only want one smoothed density line or polynomial smooth.</p>
  
  <p>Example data can be found here: <a href="https://www.dropbox.com/s/13795hnpqmwftnq/chyp3histo_total_lip.rda?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/13795hnpqmwftnq/chyp3histo_total_lip.rda?dl=0</a></p>
  
  <p>Using this code:</p>
  
  <pre><code>histos1a&lt;-ggplot(data=chyp3histo_total_lip,aes(x=totallipid))+
   geom_histogram(color=col,fill=col)+
   geom_histogram(fill="white")+ 
   geom_density()
  </code></pre>
  
  <p>Gives:
  <a href="https://i.stack.imgur.com/cTjTl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cTjTl.jpg" alt="enter image description here"></a></p>
  
  <p>Why does it draw the two lines which seem like a range?</p>
  
  <p>Cheers and thanks!</p>