Matplotlib
matplotlib.org › stable › users › explain › colors › colormaps.html
Choosing Colormaps in Matplotlib — Matplotlib 3.11.2 documentation
cmaps = {} gradient = np.linspace(0, 1, 256) gradient = np.vstack((gradient, gradient)) def plot_color_gradients(category, cmap_list): # Create figure and adjust figure height to number of colormaps nrows = len(cmap_list) figh = 0.35 + 0.15 + (nrows + (nrows - 1) * 0.1) * 0.22 fig, axs = plt.subplots(nrows=nrows + 1, figsize=(6.4, figh)) fig.subplots_adjust(top=1 - 0.35 / figh, bottom=0.15 / figh, left=0.2, right=0.99) axs[0].set_title(f'{category} colormaps', fontsize=14) for ax, name in zip(axs, cmap_list): ax.imshow(gradient, aspect='auto', cmap=mpl.colormaps[name]) ax.text(-0.01, 0.5, name, va='center', ha='right', fontsize=10, transform=ax.transAxes) # Turn off *all* ticks & spines, not just the ones with colormaps.
Matplotlib
matplotlib.org › stable › gallery › color › colormap_reference.html
Colormap reference — Matplotlib 3.11.2 documentation
import matplotlib.pyplot as plt import numpy as np cmaps = [('Perceptually Uniform Sequential', [ 'viridis', 'plasma', 'inferno', 'magma', 'cividis']), ('Sequential', [ 'Greys', 'Purples', 'Blues', 'Greens', 'Oranges', 'Reds', 'YlOrBr', 'YlOrRd', 'OrRd', 'PuRd', 'RdPu', 'BuPu', 'GnBu', 'PuBu', 'YlGnBu', 'PuBuGn', 'BuGn', 'YlGn']), ('Sequential (2)', [ 'gray', 'bone', 'pink', 'spring', 'summer', 'autumn', 'winter', 'cool', 'Wistia', 'hot', 'afmhot', 'gist_heat', 'copper']), ('Diverging', [ 'PiYG', 'PRGn', 'BrBG', 'PuOr', 'RdGy', 'RdBu', 'RdYlBu', 'RdYlGn', 'Spectral', 'coolwarm', 'bwr', 'seismi
14:28
Matplotlib Colormap Tutorial (LinearSegmentedColormap) - YouTube
10:36
Custom Color Maps in Matplotlib - YouTube
19:09
A Better Default Colormap for Matplotlib | SciPy 2015 | Nathaniel ...
00:58
Creating Custom Colormaps In Matplotlib | Python Tutorial - YouTube
r/Python on Reddit: A better default colormap for matplotlib
03:27
matplotlib Part 22 - Colormap Plots - YouTube
Which Matplotlib colormap should I use?
Use sequential for ordered magnitude, diverging for a meaningful midpoint, cyclic for wraparound values, and qualitative for unordered categories.
pythonpool.com
pythonpool.com › home › matplotlib › matplotlib cmap: sequential, diverging, cyclic, and qualitative
Matplotlib cmap: Sequential, Diverging, Cyclic, and Qualitative
How many colormaps does Matplotlib have?
Matplotlib 3.11 registers 182 colormap names. That is about 91 distinct maps plus a reversed _r twin of each; the gallery on this page lists 87 once British-spelling duplicates such as grey and gist_grey are removed. They are grouped into perceptually uniform sequential, sequential, sequential (2), diverging, cyclic, qualitative, and miscellaneous families.
docs.kanaries.net
docs.kanaries.net › topics › Matplotlib › examples-matplotlib-cmaps
Matplotlib Colormaps: Interactive Explorer and Complete Gallery ...
How do I reverse a colormap in Matplotlib?
Append _r to the name, for example cmap='viridis_r' or cmap='RdBu_r'. Every built-in colormap has a reversed twin. Programmatically you can also call plt.get_cmap('viridis').reversed().
docs.kanaries.net
docs.kanaries.net › topics › Matplotlib › examples-matplotlib-cmaps
Matplotlib Colormaps: Interactive Explorer and Complete Gallery ...
Matplotlib
matplotlib.org › stable › api › _as_gen › matplotlib.colors.Colormap.html
matplotlib.colors.Colormap — Matplotlib 3.11.2 documentation
Deprecated since version 3.11: Use cmap.with_extremes(bad=..., under=..., over=...) or Colormap(bad=..., under=..., over=...) instead.
Matplotlib
matplotlib.org › stable › users › explain › colors › colormap-manipulation.html
Creating Colormaps in Matplotlib — Matplotlib 3.11.2 documentation
cmap = ListedColormap(["darkorange", "gold", "lawngreen", "lightseagreen"]) plot_examples([cmap])
Matplotlib
matplotlib.org › stable › api › _as_gen › matplotlib.pyplot.get_cmap.html
matplotlib.pyplot.get_cmap — Matplotlib 3.11.2 documentation
Get a colormap instance, defaulting to rc values if name is None · If a Colormap instance, it will be returned. Otherwise, the name of a colormap known to Matplotlib, which will be resampled by lut. The default, None, means rcParams["image.cmap"] (default: 'viridis')
Analytics Vidhya
analyticsvidhya.com › home › cmap in python: tutorials & examples | colormaps in matplotlib (updated 2026)
Cmap in Python: Tutorials & Examples | Colormaps in Matplotlib (Updated 2026)
January 2, 2026 - Nowadays, developers are exploring new Python packages with modern styles such as Seaborn, Plotly, and even Pandas, while Matplotlib, with its enduring appeal, remains in many programmers’ hearts. Matplotlib, a widely-used data visualization library, offers numerous built-in colormaps. It also empowers users to craft custom colormaps, granting enhanced control and flexibility over the color schemes in their visualizations, a valuable feature when considering cmap in python colormaps.
Matplotlib
matplotlib.org › stable › api › cm_api.html
matplotlib.cm — Matplotlib 3.11.2 documentation
import matplotlib as mpl cmap = mpl.colormaps['viridis']
Matplotlib
matplotlib.org › 3.1.1 › api › _as_gen › matplotlib.pyplot.set_cmap.html
matplotlib.pyplot.set_cmap — Matplotlib 3.1.2 documentation
cmap must be a Colormap instance, or the name of a registered colormap. See matplotlib.cm.register_cmap() and matplotlib.cm.get_cmap().
Matplotlib
matplotlib.org › stable › api › _as_gen › matplotlib.pyplot.set_cmap.html
matplotlib.pyplot.set_cmap — Matplotlib 3.11.0 documentation
matplotlib.pyplot.set_cmap(cmap)[source]# Set the default colormap, and applies it to the current image if any. Parameters: cmapColormap or str · A colormap instance or the name of a registered colormap. See also · colormaps ·
