Plotting error bars

Let's say you have some continuous data with a continuous error (or variance) measurement. Typically, you would just call matplotlib's errorbar function:

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 2 * np.pi)
y_sin = np.sin(x)
y_cos = np.cos(x)
plt.errorbar ...
more ...

Line-color cycling

When plotting a series of lines, it's nice to pull a series of colors from a colormap (especially if there's some sequential relationship between lines). In fact, this has been asked (and answered) multiple times on the Matplotlib mailing list (e.g., [1] and [2]) and on StackOverflow ...

more ...