ENH: Collection.set_paths by rcomer · Pull Request #26342 · matplotlib/matplotlib · GitHub
Skip to content

ENH: Collection.set_paths - #26342

Merged
greglucas merged 1 commit into
matplotlib:mainfrom
rcomer:cs-set_paths
Jul 19, 2023
Merged

ENH: Collection.set_paths#26342
greglucas merged 1 commit into
matplotlib:mainfrom
rcomer:cs-set_paths

Conversation

@rcomer

@rcomer rcomer commented Jul 18, 2023

Copy link
Copy Markdown
Member

PR summary

Closes #26340

I didn't add a changenote because I think this is covered by "Setting properties on the ContourSet can now usually be done using standard collection setters"
https://matplotlib.org/devdocs/api/next_api_changes/behavior/25247-AL.html

PR checklist

@rcomer

rcomer commented Jul 18, 2023

Copy link
Copy Markdown
Member Author

@rcomer rcomer added this to the v3.8.0 milestone Jul 18, 2023
Comment thread lib/matplotlib/contour.py Outdated
Comment on lines +980 to +982

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @anntzer's comment #26340 (comment)
I think we could just add this change to Collection.set_paths(paths) method definition instead so others can also subclass and take advantage of it (could remove the method definition from PathCollection then too I think.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, I misread @anntzer's comment. I've now updated Collection.set_paths. I left my test in because set_paths does not appear in test_collection.py. I assume the ContourSet is as good a place as any to make sure this code path is covered?

@rcomer rcomer changed the title ENH: ContourSet.set_paths ENH: Collection.set_paths Jul 19, 2023
@greglucas
greglucas merged commit 17412bf into matplotlib:main Jul 19, 2023
@rcomer
rcomer deleted the cs-set_paths branch July 19, 2023 13:47
@rcomer rcomer mentioned this pull request Oct 16, 2025
5 tasks
@larsoner larsoner mentioned this pull request Aug 31, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH]: ContourSet.set_paths

3 participants