How to group the values of x-axis for boxplots

Viewed 46

My x-axis ranges from 0 to about 2000, and using this code the resulting image is useless as there are about a thousand boxplots right next to each other:

sns.boxplot(x = data.x, y = data.y, palette="rainbow")

enter image description here

Is there some easy way to define a number of boxplots that the data should be split into? Like the bins option for histograms? I'd expect a result like only one boxplot in the range of 0 - 50 on the x-axis, instead of 50 individual ones.

0 Answers
Related