matplotlib 3.5.1

BackRef

A Collection represents a sequence of .Patch \es that can be drawn more efficiently together than individually. For example, when a single path is being drawn repeatedly at different offsets, the renderer can typically execute a draw_marker() call much more efficiently than a series of repeated calls to draw_path() with the offsets put in one-by-one.

Most properties of a collection can be configured per-element. Therefore, Collections have "plural" versions of many of the properties of a .Patch (e.g. .Collection.get_paths instead of .Patch.get_path ). Exceptions are the zorder, hatch, pickradius, capstyle and joinstyle properties, which can only be set globally for the whole collection.

Besides these exceptions, all properties can be specified as single values (applying to all elements) or sequences of values. The property of the i \th element of the collection is:

prop[i % len(prop)]

Each Collection can optionally be used as its own .ScalarMappable by passing the norm and cmap parameters to its constructor. If the Collection's .ScalarMappable matrix _A has been set (via a call to :None:None:`.Collection.set_array`), then at draw time this internal scalar mappable will be used to set the facecolors and edgecolors , ignoring those that were manually passed in.

Base class for Collections. Must be subclassed to be usable.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.axes._base._AxesBase.relim matplotlib.collections.QuadMesh matplotlib.collections.EllipseCollection.__init__ matplotlib.collections.PolyCollection.__init__ matplotlib.collections.BrokenBarHCollection.__init__ matplotlib.collections.PathCollection.__init__ matplotlib.axes._base._AxesBase.add_collection matplotlib.collections.LineCollection matplotlib.collections.LineCollection.__init__ matplotlib.collections.RegularPolyCollection.__init__ matplotlib.figure.FigureBase._gci matplotlib.pyplot.gci matplotlib.collections.CircleCollection.__init__ matplotlib.transforms.AffineDeltaTransform

Local connectivity graph

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


File: /matplotlib/collections.py#27
type: <class 'type'>
Commit: