-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
(WIP)ENH: plot now supports cycler #12547
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
Conversation
This is the sort of application that |
yes we can implicity depend on |
cycler is packaged separately (basically everywhere) so you can directly depend on it without requiring newer mpl. |
hmm, ok, then we should probably do that (and add alongside the mpl dep in install). |
@sinhrks can we change to use cycler? (and raise if not installed and a list provided) |
@sinhrks status? |
@jreback Sorry, will revisit to use cycler. |
Updated to use 1. Whether to add cycler kwdsBecause one
Or, allow to accept
2. How to handle cycler which doesn't have required length
Another option is implicitly repeat. CC: @TomAugspurger |
|
I would suggest 1) and converting any lists that come in via kwargs to cyclers that are added together (and to the thing passed into the cycler kwarg) and any length 1 things are converted to length 1 cyclers that are multiplied. That would give you one cycler to worry about internally, not put too much burden on your user and give them access to the full power of cycler if they want it. |
And if you 'call' a cycler for c in cyc():
... vs for c in cycr:
... It will implicitly repeat. |
Thanks, how about following spec?
|
Also if cycler has any sharp edges, we can probably fix it upstream. |
@sinhrks status of this? (I think the spec you outlined above looks fine!) Can you also add a whatsnew notice? And probably something in the install instructions. |
@sinhrks can you update |
@sinhrks status? |
closing, but if you can update @sinhrks pls reopen. |
git diff upstream/master | flake8 --diff
cycler
regardless of mpl version (previously tried if mpl >= 1.5)Cyclic option handling
Allows to accept some option (currently only
hatch
) as a list, each element is applied to corresponding columns.This can be more generalized, but I think it's better to refactor plotting submodule beforehand.
Hatch example