🌐
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
People also ask

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 ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › matplotlib-pyplot-set_cmap-in-python
Matplotlib.pyplot.set_cmap() in Python - GeeksforGeeks
July 12, 2025 - Matplotlib.pyplot.set_cmap() is a function in matplotlib that is used to set the default colormap for the current image or plot.
🌐
Python Graph Gallery
python-graph-gallery.com › the python graph gallery › colors › create and customise palettes in matplotlib
Create and customise palettes in Matplotlib
2 weeks ago - from matplotlib.colors import ListedColormap # Define your custom color palette custom_colors = ['#264653', '#2a9d8f', '#e9c46a', '#f4a261', '#e76f51'] # Create a ListedColormap custom_cmap = ListedColormap(custom_colors) custom_cmap
🌐
GeeksforGeeks
geeksforgeeks.org › python › matplotlib-colors-colormap-class-in-python
Matplotlib Colormaps - GeeksforGeeks
December 23, 2024 - import matplotlib.pyplot as plt import numpy as np from matplotlib.colors import ListedColormap colors = ["blue", "green", "yellow"] cmap = ListedColormap(colors) data = np.random.randn(10, 10) plt.imshow(data, cmap=cmap) plt.colorbar() plt.show()
🌐
Python Pool
pythonpool.com › home › matplotlib › matplotlib cmap: sequential, diverging, cyclic, and qualitative
Matplotlib cmap: Sequential, Diverging, Cyclic, and Qualitative
July 13, 2026 - Quick answer: Choose a Matplotlib colormap by data meaning: sequential for ordered magnitude, diverging for a meaningful midpoint, cyclic for wraparound quantities, and qualitative for categories. Pair cmap with explicit normalization and a colorbar.
🌐
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.
Find elsewhere
🌐
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')
🌐
Kanaries
docs.kanaries.net › topics › Matplotlib › examples-matplotlib-cmaps
Matplotlib Colormaps: Interactive Explorer and Complete Gallery – Kanaries
August 19, 2026 - The explorer below renders every colormap that ships with Matplotlib, grouped the way the official docs group them. Click a color bar to copy its cmap= argument.
🌐
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.
🌐
Seaborn
deeplearningnerds.com › matplotlib-color-maps
Matplotlib - Colormaps
December 15, 2023 - The cmap parameter is the Colormap. Here we can choose the name of a Colormap provided by Matplotlib.
🌐
Medium
medium.com › @stacyfuende › colormaps-in-python-faecd8010f6c
Colormaps in Python. Here are some alternative color maps… | by Stacy M | Medium
September 6, 2025 - Here are some alternative color maps (cmaps) you can use in your maps to convey different visual styles or highlight specific features. These are built into Matplotlib, and you can specify them in the cmap parameter:
🌐
LabEx
labex.io › questions › what-is-cmap-660161
What is cmap? | LabEx
August 6, 2025 - In programming, particularly in data visualization libraries like Matplotlib (Python), `cmap` refers to "colormap.
🌐
Medium
samjdedes.medium.com › exploring-matplotlibs-colormaps-65f216103277
Exploring Matplotlib's Colormaps - Sam Dedes - Medium
February 12, 2021 - def plot_cmap(labels, data, ax, chart_type='bar', cmap=None): """ Creates chart of given type and colormap. Must instantiate fig, ax outside of function. Parameters: labels (list): labels for each data point data (list): data points to be graphed ...
🌐
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 ·