-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH] Initial support for linestyle cycling on plot() #3818
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
@@ -269,6 +269,10 @@ backend : %(backend)s | |||
# as list of string colorspecs: | |||
# single letter, long name, or | |||
# web-style hex | |||
#axes.linestyle_cycle: - # linestyle cycle for plot lines as a list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just add a comma there?
I find the |
There is the generalization to have a 'style_cycle` which is loaded with dicts so you can set up what ever crazy cycles you want (all the colors with 'x', all the colors with 'o',,, vs colors + markers in lockstep vs 'b' with all the symbols, 'r' with all the symbols...). |
yeah, the process_plot_var_args was my original hangup in solving this problem. I have made about 4 separate attempts at solving it, and each time I failed to fix it. In retrospect, I think I kept trying to solve too much at once rather than incrementally chipping away at it. As for your generalization, I am not exactly sure how a dictionary would enable that. One could supply iterators generated from itertools.product() to each cycle-setter, couldn't they? |
|
Ah, you are right about product(); I wasn't thinking it through. The difficulty with your proposal is controlling which sets get used where. Right now, there are, internally, two color cycles, one for plot() and one for bar(). I doubt one would want the linestyle cycle to apply to bar()-based calls. Then there is the ugly question of compatibility. How would style_cycle and axes.color_cycle coexist? |
Note to self, just because tests.py --pep8 returns OK in about 2 seconds doesn't mean that PEP8 tests were actually done (my anaconda environment didn't have pep8 installed...) |
Added nominal tests for color and linestyle cycles
3aa87e0
to
c71136e
Compare
So I was just reviewing some code and came up with an idea for color cycling which may have some mileage (in fact, it is just a reincarnation of the idea @tacaswell was proposing above). Right now, we have a special meaning for the keyword value A dumb implementation might look like:
I propose that a standard plotting keyword be added, something like |
I once tried something like that a long time ago, but failed. The failure Perhaps this idea needs to dovetail with some of the artist property/css On Wed, Dec 3, 2014 at 12:49 PM, Phil Elson notifications@github.com
|
@WeatherGod I think this should be re-address using Cycler. |
Right, it does look like the right thing to do. So basically, redo this to use the Cycler objects? |
Yes. I think the right path here is to add a |
Sounds like a good project to do on an airplane ride to SciPy, don't you On Wed, Jun 17, 2015 at 9:56 AM, Thomas A Caswell notifications@github.com
|
👍 - that, or in the sprints proper... might even be a nice little project for somebody with less experience. |
The "default changes" tag should be added to this pull request. |
This should not be changing any defaults, just adding more flexibility. On Thu, Jul 30, 2015, 7:26 AM Philippe Pinard notifications@github.com
|
Sorry, was confused what pr this was my email |
This should be considered as superseded by #4686. |
Work in progress. Need tests and need to make sure I don't have unintended side effects.
Do we want to do markers as well? Possibly hatches, too?