-
Couldn't load subscription status.
- Fork 51
Description
When the original proposal for the Cycler was made I put together an implementation of a "persistent cycler" that used the same back-end but provided an interface whereby values were provided in exchange for a key (label). The first time a value is requested the next value in the cycler is returned while on subsequent calls the same result will be returned for the same key.
The use case was for consistent labeling of plots throughout an analysis. When performing initial analysis it's often not important what the styles used are, but it is helpful if they stay the same.
I imagine implementing this as a subclass of Cycler with a .get() accessor (similar to a dictionary) or perhaps as a simple class that contains a cycler object within. This might put it out of scope of this project. It would be nice (long term) to be able to pass these cyclers into matplotlib functions and have styles assigned automatically (and in the case of the persistent cycler on the basis of labels).
If this seems reasonable I can open a couple of PRs with alternate implementations for discussion.