Do the widths of boxplots mean anything?

Question

In Seaborn, do the widths of boxplots mean anything?

Answer

No, the widths of boxplots actually do not mean anything. The width values are arbitrary and are mainly to make the boxplots easier to visualize.

If needed, the widths of boxplots can be changed using the width argument, with a float value passed in.

sns.boxplot(data=df, x='label', y='value', width=0.45)
2 Likes

But in the lesson says The box represents the interquartile range
Doesn’t width has any relation with the above interquartile range

You may be confusing width and length of the box plot.
In the image shown in this lesson the box plot displayed is actually on its side.

It is the length of the box plot that represents its interquartile range and not its width.

Hope this clears things up.

2 Likes