-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
[Bug]: Useless recursive group in SVG output when using path_effects #28146
Comments
I think that this holds for any backend, not just SVG, as it seems to stem from: matplotlib/lib/matplotlib/patheffects.py Lines 122 to 138 in 4cbef2d
Not sure if there are cases where this is needed (in your simple path effect case, it is clearly not), if it is just a way to get code that works with any backend or if this can be simply changed though... |
In my case, I want to use matplotlib to generate an artistic plot which contains a lot of polygons (>2000). I got the output SVG file. But basically no SVG viewer can open it. |
This is fixed by #27906 (and this issue is a duplicate of #27843). The core problem is diagnosed in #27843 (comment) @szsdk Can you check with the pre-release |
@tacaswell Thanks. The pre-release solves the problem. |
Bug summary
I noticed that when using
path_effects
in matplotlib, the SVG output contains a useless recursive group. This group is not present whenpath_effects
is not used.Code for reproduction
Actual outcome
Expected outcome
I got this SVG output when commenting out the line
path_effects=[path_effects.Stroke(capstyle="round", joinstyle="round")]
:Additional information
No response
Operating system
No response
Matplotlib Version
3.8.3
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
None
The text was updated successfully, but these errors were encountered: