title: "Barplot like" histogram with a probability density curves in R
body: <p>I have 2 groups of data, which I represented using barplot. To the same data I fitted a mixture model and I would like to plot the probability densities I've got over my data in barplot. The problem I encountered is that the values on the x axis in barplot (step is 1.1) are different from the intervals I used for calculating probability density ( step is 0.01), so the probability densities are squeezed. If I change the step size when fitting probability densities to the data, the lines are kinked, which does not look nice.</p>
  
  <p>I tried to use a histogram, which works well for plotting probability densities, however I only managed to plot 2 histograms on the same graph, but I want my data to be represented in the way that barplot does.</p>
  
  <p>Could someone please advise me how I can do it. </p>
  
  <p>Thank you. </p>