-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Various issues with miter limits #9830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
there are two issues here:
So to really deal with this issue, it looks like we'd have to actually add a new rcParam (miterlimit), and have each of the backends respect it (including a simple change in This bug seems reasonably low priority and high effort? But if I want to correctly handle miter limits in #16607, I would need to add this new rcParam first... |
I agree that this is pretty high effort/low priority (though see #14939)... |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Still true, still low priority. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Noticed this a while ago (while implementing mplcairo) but prompted to report due to #9829:
pdf appears to respect the miter ("pointed") joinstyle (funnily this appears to behave in the opposite manner as #9829):



svg appears to ignore it:
agg changes its mind half-way:
The behavior of agg is almost certainly due to a misunderstanding in how the miter limit is set. See https://www.w3schools.com/tags/canvas_miterlimit.asp and https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-set-miter-limit for the definition of the miter limit. Note that the two definitions differ: html defines it in absolute lengths whereas cairo defines it relative to the linewidth.
backend_agg.h has the line (multiple times)
which suggest that the author thought miter_limit takes an absolute miter limit, but in fact a relative miter limit should have been given (how do I know this? because I can reproduce the same behavior with mplcairo with the same setting, and cairo clearly documents that it uses a relative miter limit :-)).
So the current implementation ends up switching from miter join to bevel join at an angle that depends on the linewidth, eek.
NOTE: when this is fixed, remember to regen the logo per #14939 (which also showcases the issue).
The text was updated successfully, but these errors were encountered: