Ich plotte die Linie zweimal: schwarz und dann in Farbe und etwas dünner drüber; nicht sehr effizient.
Code: Alles auswählen
from pylab import *
x = [1.,2.,3.,4.,5.]
y = [1.,2.,3.,4.,5.]
lineWidth = 2
plot(x, y, color="black", lw=lineWidth*1.5, zorder=0)
plot(x, y, color="red", lw=lineWidth, zorder=1)
show()