The :None:None:`~.axes.Axes`
instance in which the colorbar is drawn.
A list of .LineCollection
(empty if no lines were drawn).
A LineCollection (empty if drawedges is False
).
Typically, colorbars are created using :None:None:`.Figure.colorbar`
or .pyplot.colorbar
and associated with .ScalarMappable
\s (such as an .AxesImage
generated via :None:None:`~.axes.Axes.imshow`
).
In order to draw a colorbar not associated with other elements in the figure, e.g. when showing a colormap by itself, one can create an empty .ScalarMappable
, or directly pass cmap and norm instead of mappable to Colorbar
.
Useful public methods are set_label
and add_lines
.
The :None:None:`~.axes.Axes`
instance in which the colorbar is drawn.
The mappable whose colormap and norm will be used.
To show the under- and over- value colors, the mappable's norm should be specified as :
norm = colors.Normalize(clip=False)
To show the colors versus index instead of on a 0-1 scale, use:
norm=colors.NoNorm()
The colormap to use. This parameter is ignored, unless mappable is None.
The normalization to use. This parameter is ignored, unless mappable is None.
The colorbar transparency between 0 (transparent) and 1 (opaque).
If unset, the colormap will be displayed on a 0-1 scale.
Draw a colorbar in an existing axes.
The following pages refer to to this document either explicitly or contain code examples using this.
matplotlib.colorbar.Colorbar
matplotlib.colors.BoundaryNorm.__init__
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them