Skip to content

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

Description

@Jacfger

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.

Activity

  1. anntzer commented on Oct 31, 2023

    @anntzer
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions