import matplotlib.pyplot as plt
from itertools import cycle
lines = ['-', '--', '-.', ':']
linecycler = cycle(lines)
plt.figure()
for i in range(10):
    x = list(range(i, i + 10))
plt.plot(list(range(10)), x, next(linecycler))
plt.show()
Can i cycle through line styles in matplotlib