Makie line plots using colormaps?

Hi,
I would like to produce a line plot where the color of each line is taken from a colormap, like batlow , see Colors · Makie

I’ve tried

lines(1:20, color=:batlow10[3])

and variations thereof but couldn’t get it to work. How could I do this?

1 Like

See the example here:

To index into a color scheme such as :batlow10,

using GLMakie
using ColorSchemes: colorschemes

lines(1:20; color = colorschemes[:batlow10].colors[3])

Thanks!