You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When making violinplots, passing inner='box' uses mpl's Axes.plot() to draw the inner boxplot.
However, the default in mpl is solid_capstyle='projecting', which extends the line too far out, and thus exaggerates both the boxplot's quartiles and the whiskers.
This becomes increasingly exaggerated with a larger linewidth, because 'projecting' uses linewidth/2 (https://matplotlib.org/stable/api/_enums_api.html#matplotlib._enums.CapStyle).
Showing incorrect data ranges may be problematic for e.g., scientific publications.
For more accurate plotting, I therefore suggest that seaborn sets the default for inner_kws to solid_capstyle='butt'. This limits the line to its actual endpoints.
I don't know whether this issue may extend to other types of plots as well.
Below is a minimal example which shows both the default and desired behaviours. I am using seaborn 0.13.2.
I set box_width to 12 to make it a bit more obvious, but even at default box_width it happens.
When making violinplots, passing
inner='box'
uses mpl's Axes.plot() to draw the inner boxplot.However, the default in mpl is
solid_capstyle='projecting'
, which extends the line too far out, and thus exaggerates both the boxplot's quartiles and the whiskers.This becomes increasingly exaggerated with a larger linewidth, because
'projecting'
useslinewidth/2
(https://matplotlib.org/stable/api/_enums_api.html#matplotlib._enums.CapStyle).Showing incorrect data ranges may be problematic for e.g., scientific publications.
For more accurate plotting, I therefore suggest that seaborn sets the default for
inner_kws
tosolid_capstyle='butt'
. This limits the line to its actual endpoints.I don't know whether this issue may extend to other types of plots as well.
Below is a minimal example which shows both the default and desired behaviours. I am using seaborn 0.13.2.
I set
box_width
to 12 to make it a bit more obvious, but even at default box_width it happens.The text was updated successfully, but these errors were encountered: