Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Revampdraw_path_collection() API.#30811

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
r3kste wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromr3kste:draw_path_collection_refactor

Conversation

@r3kste
Copy link
Contributor

PR summary

closes#30547

This PR enhances the API ofdraw_path_collection() for long term maintainability.

Summary of Changes

  1. Introduces the newVectorizedGraphicsContextBase class, which is similar toGraphicsContextBase, but each attribute is vectorized. This serves as the dataclass through which all parameters are passed todraw_path_collection().

  2. Updated signature ofdraw_path_collection() by making the parameters optional in order to support both the following:

    • The previous call withgc and all parameters present
    • The new call withvgc and none of the optional parameters
  3. Updated signature of_iter_collection() to takevgc instead ofgc and added logic to cycle through all attributes.

  4. Changeddraw() inCollection to use the newdraw_path_collection() API along withtemporary fallback for third-party backends that use the old signature.

Why is this change required?

It would become much simpler to add / vectorize new attributes in collections, without completely breaking third party backends. For example, it would greatly simplify#27937, that aims to vectorize thehatch attribute.

To-do

  • Docstrings
  • What's new note
  • Deprecation notice for the old API

PR checklist

Co-authored-by: Pranav <kingprawn5000@gmail.com>Co-authored-by: AdwaithBatchu <adwaithbatchu@gmail.com>Co-authored-by: Sreekanth-M8 <kmsreekanthsai@gmail.com>Co-authored-by: Sujal Kumar <sujaljayantkumar06@gmail.com>
@r3kster3ksteforce-pushed thedraw_path_collection_refactor branch from195e00e toa1ba476CompareDecember 4, 2025 21:29
@timhoffm
Copy link
Member

Thanks for the PR. I‘d like to hold this off until#30777 is in.

r3kste and SujalKumar06 reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[MNT]: Revampdraw_path_collection() API

3 participants

@r3kste@timhoffm@rcomer

[8]ページ先頭

©2009-2025 Movatter.jp