You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 3.1.0.post1496+gb03370a04
matplotlib
Fork me on GitHub

matplotlib.pyplot.set_cmap

matplotlib.pyplot.set_cmap(cmap)[source]

Set the default colormap, and applies it to the current image if any.

Parameters:
cmap : Colormap or str

A colormap instance or the name of a registered colormap.