Skip to content
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

[ENH]: Drop STOP codes? #28179

Open
anntzer opened this issue May 7, 2024 · 1 comment
Open

[ENH]: Drop STOP codes? #28179

anntzer opened this issue May 7, 2024 · 1 comment

Comments

@anntzer
Copy link
Contributor

anntzer commented May 7, 2024

Problem

Matplotlib Paths can have a STOP code (https://matplotlib.org/stable/api/path_api.html#matplotlib.path.Path) which marks the end of a path but are otherwise unused; paths without STOP code are also supported.
I suspect that these are a artefact due to agg's implementation (i.e. agg emits them and we therefore also do).
While #28176 is technically not an issue because the behavior is as documented, it may help to just not emit these STOPs at all. I suspect this is just a matter of looking at all places where we return paths from Agg and clip out the last STOP code when it is present.
(We don't have to drop support for user passing them in, but could hide them in the documentation.)

Proposed solution

No response

@timhoffm
Copy link
Member

timhoffm commented May 7, 2024

Seems reasonable. It's still an API change that needs communication. There may be people out there, who knew they get a STOP node, so just dropped the last node. We cannot warn on that at runtime (with reasonable effort). Still the deprecation note should mention how to manually drop the last node if it's STOP to write code that is compatible across matplotlib versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants