- Matplotlib 3.0 Cookbook
- Srinivasa Rao Poladi
- 114字
- 2021-08-13 15:16:09
Working with standard colormaps
In the last recipe, we have seen how colors can be used when plotting the graphs. If we want to visualize a data range with visual perceptual colors to get a sense of patterns in the data, it will be tedious to create color combinations that match with data changes in the range we are looking for. Matplotlib provides a range of pre-defined colormaps that can be leveraged to meet any specific requirement. Matplotlib also enables user-defined colormaps that will be covered in the next recipe.
In Python notebooks, you can type matplotlib.pyplot.cm. and press Tab or type help (matplotlib.pyplot.cm) to get a complete list of the available colormaps.