Styling
We can also style the Artists, the output of the plotting function.
Here, we are going to define the color, width, and style of different line plots.
fig, ax = plt.subplots(figsize=(5, 2.7))
x = np.arange(len(data1))
ax.plot(x, np.cumsum(data1), color='blue', linewidth=3, linestyle='--')
l, = ax.plot(x, np.cumsum(data2), color='orange', linewidth=2)
l.set_linestyle(':')
ax.plot returns a list of lines. The trailing comma in l, = unpacks its one line into l, so we can modify it afterwards.