add colorbar to a sequence of line plots
(I know this is an old question but…) Colorbars require a matplotlib.cm.ScalarMappable, plt.plot produces lines which are not scalar mappable, therefore, in order to make a colorbar, we are going to need to make a scalar mappable. Ok. So the constructor of a ScalarMappable takes a cmap and a norm instance. (norms scale data to … Read more