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
capstyle/joinstyle support for matplotlib.collections.Collection #8277
matplotlib.collections.LineCollection does not support modifying cap style and join style. I found a similar problem description on stack exchange here, but no solution could be offered.
Code for reproduction
Any plot using collections.LineCollection, for instance a matplotlib.axes.Axes.errorbar plot. Here, the error bars are drawn using a LineCollection object and the ends of the error bars are square. It would be great if they could be changed to have round caps.
As expected, the LineCollection produces lines with the default cap and join styles of the renderer.
Expected outcome
This would be a new feature and has never worked with matplotlib. It would be easy to implement and performance could remain the same if the matplotlib.collections.Collection base class could be modified to support setting a default cap style and join style for the whole collection.
A simple fix would be to add "gc.set_capstyle(...)" and "gc.set_joinstyle(...)" to the Collection.draw method and add corresponding default values to the Collection object. Such a change would allow fixing the example above by adding a single line without modifying the errorbar-related code:
I was struggling with this issue, hope this can be resolved soon.
I have a figure plot using both the seaborn barplot and matplotlib. Seaborn gives rounded errorbar, but matplotlib could't do it.
Activity
pkmn99 commentedon Oct 12, 2017
I was struggling with this issue, hope this can be resolved soon.
I have a figure plot using both the seaborn barplot and matplotlib. Seaborn gives rounded errorbar, but matplotlib could't do it.
Merge pull request #9523 from simonpf/hacktoberfest
anntzer commentedon Sep 26, 2019
fixed by #9523