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
How to draw the end caps if the line is `~Line2D.is_dashed`.
In addition to that we could determine the default capstyle programmatically in the demo, so that it's always up-to-date, even if one forgets about the demo when changing the default sometime in the future:
Activity
timhoffm commentedon Dec 16, 2021
If we mention the
Line2Ddefault, we should also mention thePathPatchdefault.I'm undecided whether that's still reasonable in the plot or whether we should discuss defaults in a dedicated section. I tend to go with the latter.
Joinstyle is also different (#18597). While at it, it should be addressed in the same fashion.
StefRe commentedon Dec 16, 2021
maybe just document the default capstyle in
set_capstyle:matplotlib/lib/matplotlib/patches.py
Lines 473 to 475 in be35409
matplotlib/lib/matplotlib/collections.py
Lines 632 to 634 in 092f833
matplotlib/lib/matplotlib/lines.py
Lines 1343 to 1346 in 092f833
matplotlib/lib/matplotlib/lines.py
Lines 1329 to 1331 in 092f833
In addition to that we could determine the default
capstyleprogrammatically in the demo, so that it's always up-to-date, even if one forgets about the demo when changing the default sometime in the future:(the same for
joinstyle)StefRe commentedon Dec 16, 2021
While making the example I noticed the following inconsistency:
matplotlib/lib/matplotlib/patches.py
Lines 485 to 487 in be35409
matplotlib/lib/matplotlib/markers.py
Lines 327 to 328 in f6e0ee4
return a
CapStyleobject while the other 3 methods return a string (i.e....capstyle.name).Is this something a separate issue should be opened for? (at least it should be documented which type is returned in each case).
StefRe commentedon Dec 17, 2021
There's another exception (which is, however, correctly documented #13647):
matplotlib/lib/matplotlib/patches.py
Lines 4277 to 4282 in 1535cdc
StefRe commentedon Dec 17, 2021
And the last one:
matplotlib/lib/matplotlib/markers.py
Line 288 in f6e0ee4
Also not documented:
matplotlib/lib/matplotlib/markers.py
Lines 249 to 250 in f6e0ee4
StefRe commentedon Dec 17, 2021
In total we seem to have the following defaults (hope that I didn't overlook anything) :
Line2DFancyArrowPatchSo maybe it's indeed not so good an idea to give the defaults in the demo but rather document them with their classes.