title: how to plot probability histogram in ggplot2
body: <p>I want to plot a probability histogram overlay with probability curve and compare them between two group.
  my code is as following,</p>
  
  <pre><code>ggplot(MDmedianall, aes(x= MD_median, y=..density.., fill =IDH.type )) +
   geom_histogram(alpha = 0.5,binwidth = 0.00010,  position = 'identity') +
   geom_density( stat="density", position="identity", alpha=0.3 ) + 
   scale_fill_discrete(breaks=c("0","1"), labels=c("IDH wild type","IDH mutant type")) + 
   scale_y_continuous(labels = scales :: percent) + 
   ylab("Relative cumulative frequency(%)") + 
   xlab("MD median value")
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/I1tLI.png" alt="enter image description here"></p>
  
  <p>However, the y axis is not what I want, any reasons for that?
  BTW, how to change the line style and label them within the color square on the right.</p>