title: Show the percentage instead of count in histogram using ggplot2 | R
body: <p>I'm using a histogram to plot my 3 groups data. But as histogram do, it counts how much each group have those values (in x-axis) and what I want is to the percentage of how much (in %) this value appears/occurs.</p>
  
  <p>Here is my generated figure, I use this regular code to plot the histogram:</p>
  
  <pre><code>ggplot2.histogram(data=dat, xName='dens',
                    groupName='lines', legendPosition="top",
                    alpha=0.1) + 
    labs(x="X", y="Count") +
    theme(panel.border = element_rect(colour = "black"),
          panel.grid.minor = element_blank(), 
          axis.line = element_line(colour = "black")) + 
    theme_bw()+
    theme(legend.title=element_blank())
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/WqKej.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WqKej.png" alt="enter image description here"></a></p>
  
  <p>Any ideas/suggestions?</p>