import matplotlib.pyplot as plt
import numpy as np
from cycler import cycler
colors = ['#377eb8', '#ff7f00', '#4daf4a',
'#f781bf', '#a65628', '#984ea3',
'#999999', '#e41a1c']
styles = 2*[':', '-', '--', '-.']
plt.rc('axes', prop_cycle=(cycler('color', colors)+cycler('linestyle', styles)))
for i in range(len(colors)):
x = np.linspace(0.0, np.pi)
plt.plot(x, np.sin(x+ i*np.pi/9), label=colors[i])
plt.legend()
Created
January 27, 2021 02:19
-
-
Save mehdirezaie/c144c08b7a5f0b74f09ce98985e6d4bd to your computer and use it in GitHub Desktop.
Colorblind friendly colors
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment