title: How to plot two variables as histogram in python?
body: <p>How to make histogram-style bar-plot of continuous data in python?</p>
  <p>The data I have looks like this with simple plt.plot(x,y) (x-axis is not normalized, but is real data from 0 to 1):</p>
  <p><a href="https://i.stack.imgur.com/M4hRY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M4hRY.png" alt="enter image description here" /></a></p>
  <p>So obviously I would need to plot some kind of distribution, but I don't know what is it called that I am looking for. I want the x and y axis to stay the same, so I don't want to plot histogram of one of the variables, but instead of plotting every point, I want to plot only the average values of y between some intervals of x. I could do this with plt.bar(bins, y-columns), and I know how to calculate the bins, but how to find automatically the corresponding y-column values?</p>
  <p>I suppose there must be an easy and automated way of doing what I described, however, I can't find it.</p>