GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Installation
  • Documentation
  • Examples
  • Tutorials
  • Contributing

This view

  • Original page
  • New address

GeezerVison is showing matplotlib.org — matplotlib.colors.Colormap — Matplotlib 3.1.2 documentation

You are reading an old version of the documentation (v3.1.1). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.Colormap.html
Version 3.1.2
matplotlib
Fork me on GitHub

Navigation

  • index
  • modules |
  • next |
  • previous |
  • home| 
  • contents »
  • API Overview »
  • matplotlib.colors »

Quick search

Table of Contents

  • matplotlib.colors.Colormap
    • Examples using matplotlib.colors.Colormap

Related Topics

  • Documentation overview
    • API Overview
      • matplotlib.colors
        • Previous: matplotlib.colors.BoundaryNorm
        • Next: matplotlib.colors.DivergingNorm
Show Page Source

matplotlib.colors.Colormap¶

class matplotlib.colors.Colormap(name, N=256)[source]¶

Bases: object

Baseclass for all scalar to RGBA mappings.

Typically Colormap instances are used to convert data values (floats) from the interval [0, 1] to the RGBA color that the respective Colormap represents. For scaling of data into the [0, 1] interval see matplotlib.colors.Normalize. It is worth noting that matplotlib.cm.ScalarMappable subclasses make heavy use of this data->normalize->map-to-color processing chain.

Parameters:
name : str

The name of the colormap.

N : int

The number of rgb quantization levels.

colorbar_extend = None¶

When this colormap exists on a scalar mappable and colorbar_extend is not False, colorbar creation will pick up colorbar_extend as the default value for the extend keyword in the matplotlib.colorbar.Colorbar constructor.

is_gray(self)[source]¶
reversed(self, name=None)[source]¶

Make a reversed instance of the Colormap.

Note

Function not implemented for base class.

Parameters:
name : str, optional

The name for the reversed colormap. If it's None the name will be the name of the parent colormap + "_r".

See also

LinearSegmentedColormap.reversed
ListedColormap.reversed
set_bad(self, color='k', alpha=None)[source]¶

Set color to be used for masked values.

set_over(self, color='k', alpha=None)[source]¶

Set color to be used for high out-of-range values. Requires norm.clip = False

set_under(self, color='k', alpha=None)[source]¶

Set color to be used for low out-of-range values. Requires norm.clip = False

Examples using matplotlib.colors.Colormap¶

../../_images/sphx_glr_contourf_demo_thumb.png

Contourf Demo

© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2018 The Matplotlib development team.
Last updated on Jan 05, 2020. Created using Sphinx 1.8.5. Doc version v3.1.1-79-g90d53b526.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.