Specify the color in the matplotlib 2D map

Specify cmap to specify the color with matplotlib

import numpy as np
import matplotlib.pyplot as plt

x = np.random.random((100, 100))
plt.imshow(x, cmap="GnBu")
plt.colorbar()

tmp.png

I've specified GnBu (I think it's Green-Blue) here, but there are many other colors defined: http://matplotlib.org/examples/color/colormaps_reference.html

Many of these have opposite colors (such as _r followed by: gray_r).

Recommended Posts

Specify the color in the matplotlib 2D map
2D plot in matplotlib
matplotlib gallery and color map
[Golang] Specify an array in the value of map
[Python] Adjusted the color map standard
The first step in Python Matplotlib
Set the xticklabels color individually with matplotlib
Introducing the color map extension library palettable
The date is displayed incorrectly in matplotlib.
I want to change the color by clicking the scatter point in matplotlib
Open an Excel file in Python and color the map of Japan
[Mac] Run the RealSense D415 sample in Python
Spread the Geographical Survey Map tiles in Python
When the axis and label overlap in matplotlib
Fix the argument of the function used in map
Put the second axis in 2dhistgram of matplotlib
Specify the view URL in your Django template
Align Matplotlib graph colors with similar colors (color map)
Specify the lighting Model of SCN Material in Pythonista
Let's apply the brand image color to the matplotlib colormap!
Omit the decimal point of the graph scale in matplotlib
[Python] Summary of how to specify the color of the figure
How to add color bars in matplotlib bar plot
Put matplotlib in Centos7.
View images in Matplotlib
3D plot with matplotlib
palettable color map list
matplotlib Color list creation
Read the VTK file and display the color map with jupyter.
Notes on coloring by value in the matplotlib scatter plot