Okabe-Ito accessible color sequence#
Matplotlib now includes the Okabe-Ito color sequence. Its colors remain distinguishable for common forms of color-vision deficiency and when printed.
For example, to set it as the default colormap for your plots and image-like artists, use:
import matplotlib.pyplot as plt
from cycler import cycler
plt.rcParams['axes.prop_cycle'] = cycler('color', plt.colormaps['okabe_ito'].colors)
plt.rcParams['image.cmap'] = 'okabe_ito'
Or, when creating plots, you can pass it explicitly:
(Source code, 2x.png, png)