Skip to content

[Doc]: Explicitly state the difference of set_* and get_*. #27233

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

Closed
Jacfger opened this issue Oct 31, 2023 · 1 comment
Closed

[Doc]: Explicitly state the difference of set_* and get_*. #27233

Jacfger opened this issue Oct 31, 2023 · 1 comment

Comments

@Jacfger
Copy link

Jacfger commented Oct 31, 2023

Documentation Link

https://matplotlib.org/stable/api/collections_api.html#matplotlib.collections.Collection.set_facecolor

Problem

I found the documentation of the function set_facecolors() wasn't quite clear to me as in my recent issue I realize set_facecolors() wasn't actually the same as directly modifying get_facecolors() (And the only major difference for me was setting stale=True, probably because we can't set methods to const in Python).

#27216

Suggested improvement

I think it would be wise to explicitly state that the set_* functions mark the elements/axes or anything as "stale" which trigger redrawing when next draw() is invoked.

I was looking into how to add it myself but as it turns out there were a lot of set_* functions. So I might as well ask if this is a good or stupid idea before I do it.

@anntzer
Copy link
Contributor

anntzer commented Oct 31, 2023

I think this duplicates #24479 (see in particular #24479 (comment) for concrete proposals). Closing, but feel free to restart the discussion on the other thread.

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