-
Notifications
You must be signed in to change notification settings - Fork 65
RFC: Implement cycling color palette for series (/plots). Close https://github.com/JuliaPlots/Makie.jl/issues/189 #37
Conversation
|
Does this implement a color cycle "out of the box" or one always has to setup a theme? because if setting up a theme is always necessary this doesn't bring much more difference than simply setting the colors of the plots. |
|
That would be as simple as making a |
|
I know this may not sound very nice, but the default matplotlib cycle is not only excellent but also the result of serious research. Perhaps you want to consider it as the default for abstract plotting as well. |
|
Well it sounds nice enough, but exactly the same is true for The use of visually optimal color themes is in fact an important research field, and I agree we should only follow best principle here. Indeed, PlotUtils (depended on by Plots and Makie) only offers color themes that are backed by recent scientific publications to have ideal perceptual properties (e.g. https://arxiv.org/abs/1509.03700 and http://tos.org/oceanography/assets/docs/29-3_thyng.pdf ). But on the other hand the common notion among matplotlib users that the inbuilt color cycle, and it's inbuilt viridis color scheme, is somehow objectively superior to other good color themes has no scientific basis. While you can say that some color maps are objectively good, there is no "best" theme. Just like the widespread belief that Python is objectively superior to all other languages and you can just use numba has no solid basis. What I do think we should offer is a |
|
Or would it make sense to implement a more general |
|
I am very impressed by your knowledge on the topic and I did not know that Although, I was indeed aware that many other color maps / cycles are just as good as matplotlib's one. This only shows that mtl's color circle is not objectively superior to everything, but it is one of the "good" ones. Since you have established that
sounds nice, but in my eyes only has secondary priority; as long as an "objectively good" default theme is established, then having extra "mpl"/gr themes is nice but not crucial. Therefore I do not think the word "should" is very suited. |
|
FWIW, matplotlib just replaced their default color cycle with Vega's https://matplotlib.org/users/dflt_style_changes.html#colors-in-default-property-cycle |
|
Yeah when I am referring to mpls cycle, I am referring to the "new" one of version 2.0. But to the best of my knowledge this isn't very "new", I think this version was out since a year ago, if not more? |
|
Oh, but there's a brand new matplotlib 3.0 just now, that's the change I'm talking about. The new major version is primarily an update of the look, styles and colors - I guess I'n not the only one who considers theming of primary importance :-) EDIT: oh @Datseris I was wrong on the matplotlib version - that was indeed at the 2.0 shift. Sorry! |
|
But just to restate the open questions I have:
|
|
And one last question - what is the testing policy for Makie? Is there some kind of visual comparison tests of Plots? When adding new functionality such as this, do you want a new plot example or what is preferable? |
e6cc1a8 to
29efa67
Compare
|
anything in the example databank will get tested and can be referenced in the documentation. |
|
If you add new examples, it will first ignore the new test (but run it), untill we make a new recording of the reference images! |
|
Ah, I never realized you didn't add this as the default color :D |
|
Can |
|
@SimonDanisch yes 👍 |
|
I'm actually not sure! I'll try a few things to see what is the least invasive change that can be done here to make it compatible with the grouping mechanism, |
|
Would you like me to push a PR with the implementation I outlined above? Or do you want to wait to see what is most appropriate? |
|
May be better to wait a little bit as I'm still finalizing the grouping implementation, so am not 100% sure what I'd need for |
|
Actually I'll probably do it as I need a general For me to understand, what is the intended behaviour of this wrt grouping? Say I have a palette |
|
Yes, I think so. Every new trace/Plot/series/we_really_need_a_name_for_this gets a new color, and grouping creates that color IMHO. |
This allows:
You can also use a symbol
But the below doesn't work (or at least it doesn't update the scene) and I don't know if it could with this implementation:
Paletteshould probably also have a niceshowmethod and be exported from Makie.I'm also not 100% sure how this behaves when adding series that are composed by series (plots composed by plots).