I need to make different amounts of line plots with Matplotlib, but I have not been able to find a colormap that makes it easy to distinguish between the line plots. I have used the brg colormap like this:
colors=brg(np.linspace(0,1,num_plots))
with
for i in range(num_plots):
ax.step(x,y,c=colors[i])
With four plots, this could look like this:
Notice how hard it is to distinguish the colors of the top and bottom plots, which is especially bad if a legend is used.
I've tried a lot of different colormaps like rainbow and jet, but with this setup, brg seems to give the best result for num_plots between 1 and 12.
I did find this How to get 10 different colors that are easily recognizable and this Wiki page Help:Distinguishable colors, but I don't know if this can be used in any way..
Is there an easy fix to this, or will I have to make do with this?


