Consider a stack plot of sin(a) and -sin(a). While it might be reasonable to render a stack plot of these as a flat line, it's probably more useful to stack the sums independently for each variable ...
import pylab as plt import numpy as np plt.figure() plt.gca().stackplot([0, 1, 2, 3, 4], [[1, 2, 3, 4, 5], [5, 4, np.nan, 2, 1], [1, 1, 1, 1, 1]]) Notice that the ...