Define custom color_palette in Julia Plots package

1.7k views Asked by At

I am currently using Plots package in Julia with pyplot as the backend. I can choose color_palette and make plots by

pyplot(color_palette=:delta)
Plots.plot(x, y)

What is the syntax to define and use a custom color palette according to, for example, Okade and Ito below, for color-blind-friendliness? Thanks! Okade and Ito color palette

1

There are 1 answers

4
Michael K. Borregaard On BEST ANSWER

Just pass a Vector of RGB - see the docs here https://docs.juliaplots.org/latest/colors/#Misc-1 But that particular palette is actually built into Plots - so you can get it by specifying theme(:wong2) before plotting, it will change the palette and color gradient for the duration of the session.