I'm transitioning from R to python, and was looking to plot the mean line of a two variables. It is the plot of the x variable is split into intervals for the x axis, and mean of the y variable for the y axis.
For example, if I have 1000 points (x1,y1) to (x1000, y1000), and want to plot into 3 bins, I would have 3 bars of x intervals where each would have the mean of the y variables that fall into that respective interval.
Does anyone know what this plot is called, and how I can do this in python? In R, I use the "cut" command and then plot the x,y of the cut.
Thanks!

