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 ...