Top "Color-mapping" questions

A color map is used when displaying intensity images (2D arrays).

How to convert a NumPy array to PIL image applying matplotlib colormap

I have a simple problem, but I cannot find a good solution to it. I want to take a NumPy 2…

python numpy matplotlib python-imaging-library color-mapping
How to set default colormap in Matplotlib

Especially when working with grayscale images it is tedious to set the color map for every imshow command as imshow(…

python matplotlib color-mapping
How to create a custom colormap programmatically?

I'd like to create a colormap in matlab. I want to fade the color according to gray level of pixel. …

matlab color-mapping
Correcting matplotlib colorbar ticks

I've placed a color bar alongside a choropleth map. Because the data being plotted are discrete rather than continuous values, …

python matplotlib color-mapping
Matlab: How to assign different colormaps/colorbars to different surfaces in the same Figure

I am fairly new to Matlab and have a few questions. I got two surfaces and a plane in the …

matlab matlab-figure color-mapping
Python matplotlib change default color for values exceeding colorbar range

When filling a grid with color such as when using contourf in pyplot, I need to find a way to …

python matplotlib contour color-mapping colorbar
How to redefine a color for a specific value in a matplotlib colormap

I want to use the colormap rainbow in an image using imshow. It works perfectly, but I want to redefine …

python matplotlib color-mapping
Change colour of curve according to its y-value in matplotlib

I'm trying to replicate the style of the attached figure using matplotlib's facilities. Basically, I want to change the colour …

matplotlib color-mapping
Extract matplotlib colormap in hex-format

I am trying to extract discrete colors from a matplotlib colormap by manipulating this example. However, I cannot find the …

python matplotlib hex color-mapping colormap
Create a color generator from given colormap in matplotlib

I have a series of lines that each need to be plotted with a separate colour. Each line is actually …

python matplotlib color-mapping