matplotlib colormap for lines code example
Example: matplotlib: use colormaps for line plot colors
import numpy as np
import matplotlib.pylab as plt
plt.rcParams["figure.figsize"] = [7, 7]
plt.rcParams["figure.autolayout"] = True
x = np.array([0,1])
y = np.array([1,1])
n = 50
colors = plt.cm.hsv(np.linspace(0, 1, n))
for i in range(n):
plt.plot(x,y * i, color=colors[i])
plt.show()