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
{{ message }}
Repository navigation
Boxplot: Median line too long after changing linewidth #19409
I was able to improve this a bit (I stole that trick from here):
Ideally, one could now reduce the median line length such that it no longer overlaps with the black bounding line of the box.
Since the box line width is only accessible in "points" units, it would need to be transformed to data units.
I was unable to get this to work, though.
Would it be possible/desirable to change the default setting for solid_capstyle?
Could this be handled in a different way?
I would like to make a small contribution in order to fix this issue. The solution has already been hinted above. This would be my first contribution and I am not quite clear on what is expected when testing the fix.
Activity
anntzer commentedon Jan 31, 2021
I agree with changing the capstyle. As for the overlap at the edges, likely it's a zorder issue? #18216/#17247 likely matter too.
tacaswell commentedon Jan 31, 2021
There are different cap styles for solid lines and dashed lines.
This is also a case where the re-scaling of the dash pattern with linewidth is not an improvement...
oscargus commentedon Jun 4, 2022
Zooming in gives that the zorder for the mean line indeed should be changed as well (as it is clear that there are different cap styles).
oscargus commentedon Jun 4, 2022
Should be a first good issue: change the default cap style and the zorder. Problems may involve testing.
wmandla commentedon Jun 23, 2022
I would like to make a small contribution in order to fix this issue. The solution has already been hinted above. This would be my first contribution and I am not quite clear on what is expected when testing the fix.
kidkoder432 commentedon Aug 7, 2023
Where are these defined? Maybe changing the default cap style would help.
kidkoder432 commentedon Aug 7, 2023
Nevermind, found it in
lines.py:299Boxplot fix median line extending past box boundaries (#26462)
Backport PR matplotlib#26462: Boxplot fix median line extending past …
Merge pull request #26568 from meeseeksmachine/auto-backport-of-pr-26…