Makie plots with color cycles and color palettes

Makie seems really exciting, but when I tried it as part of my workflow, I found it lacks a rather basic feature.

It seems that Makie does not have working color cycles (automatically picking up a new color for each new line in a plot). The lack of automation does not bother me too much as even in matplotlib I frequently just put these colors by hand.

However, picking up custom but pretty colors from a palette seems very clunky (personal subjective opinion) and under documented (I think that is fairly objective). The majority of the examples in the gallery just use :red :blue :green which definitely detracts from the visual appeal and legibility.

In matplotlib I can pick the default palette and just use “C1”, “C2”, etc as references to these colors. What is the “standard” way in Makie to draw a couple of lines colored by colors from a pretty palette? Something that does not require boilerplate hopefully? Any chance this advice can be added to the tutorial/gallery instead of using the :red :green :blue lines? (Happy to make the edits if I know what the Makie invocation looks like)


These are some pages I went through before writing the post: and in particular the following examples:

I don’t know what the reasons were that something like this wasn’t added before, but I’m currently trying to add attribute cycling in this PR.

It is a bit trickier than it looks on first glance if I try to make everything as customizable for the end user as possible while also making it simple to use.


I am occasionally getting notifications from this old post, so I wanted to note:

Color cycles are now wonderfully supported by Makie

See Cyclers and Palettes in the following