I'm using pylab to plot some graphs Say I want to plot this:
x = [0,1,2,3,4,5,6,7,8,9,10] y = [0,0,0,1,1,0,0,1,0,0,0] plt.plot(x,y,'g') plt.show()
But every time [y = 1] I want to change the color of the line to red.
Is this possible?
Aucun commentaire:
Enregistrer un commentaire