ax1.set_color_cycle([colormap(i) for i in np.linspace(0, 1, number_of_plots)])
for i in range(1, number_of_plots + 1):
    ax1.plot(np.array([1, 5]) * i, label=i)
ax1.legend(loc=2)
How to avoid line color repetition in matplotlib.pyplot?