-
Notifications
You must be signed in to change notification settings - Fork 65
jk/color cycling #609
jk/color cycling #609
Conversation
jkrumbiegel
commented
Jan 20, 2021
- reorder wong colors and default markers to be more pleasing
- first implementation of attribute cycling
6494c24 to
cadcb6c
Compare
|
I would like some guidance to try and help with this. In particular I wonder about the failing test: It seems like the call to |
|
This is all happening in the So anyway, where I got stuck was to correctly inherit what should be inherited, but also to not reuse or connect observables together when inheriting, because if all lines use the same color attribute observable, things get crazy. |
|
You have 7 colors, 8 marker attributes and 5 line styles? That's all co-prime 👍 |
|
It also depends how one cycles these things. I think I'd prefer to offer different cycle options, but it gets tricky. For example, do you cycle the colors with the first linestyle, then the second? Or do you cycle them together. |
|
If they cycle together then there is most chance to tell things apart because they "differ in more than one way", so that is a sensible default, and by being co-prime the full pattern repeats only after |
|
I confess I am generally very fond of explicit approaches, so maybe my view is a bit extreme here, but wouldn't it be easier to have a type struct Default
n::Int
endsuch that scatter!(x, y, color=Default(1))
scatter!(x, y, color=Default(2))is not so hard to write (esp. if we find a shorter word than EDIT: actually, |
|
just chiming in here to say: one things I like from PyPlot is not only that it has a color cycle, but also that I can set my own color cycle via theming. E.g. I can set it to be ["teal", "black"] and once I do this the first line will be "teal" and the second "black". Would be nice to allow this here as well! |