matplotlib 3.5.1

Parameters
__init__(self, edgecolors=None, facecolors=None, linewidths=None, linestyles='solid', capstyle=None, joinstyle=None, antialiaseds=None, offsets=None, transOffset=None, norm=None, cmap=None, pickradius=5.0, hatch=None, urls=None, *, zorder=1, **kwargs)

Parameters

edgecolors : color or list of colors, default: :rc:`patch.edgecolor`

Edge color for each patch making up the collection. The special value 'face' can be passed to make the edgecolor match the facecolor.

facecolors : color or list of colors, default: :rc:`patch.facecolor`

Face color for each patch making up the collection.

linewidths : float or list of floats, default: :rc:`patch.linewidth`

Line width for each patch making up the collection.

linestyles : str or tuple or list thereof, default: 'solid'

Valid strings are ['solid', 'dashed', 'dashdot', 'dotted', '-', '--', '-.', '']. Dash tuples should be of the form:

(offset, onoffseq),

where onoffseq is an even length tuple of on and off ink lengths in points. For examples, see /gallery/lines_bars_and_markers/linestyles .

capstyle : `.CapStyle`-like, default: :rc:`patch.capstyle`

Style to use for capping lines for all paths in the collection. Allowed values are {'butt', 'projecting', 'round'}.

joinstyle : `.JoinStyle`-like, default: :rc:`patch.joinstyle`

Style to use for joining lines for all paths in the collection. Allowed values are {'miter', 'round', 'bevel'}.

antialiaseds : bool or list of bool, default: :rc:`patch.antialiased`

Whether each patch in the collection should be drawn with antialiasing.

offsets : (float, float) or list thereof, default: (0, 0)

A vector by which to translate each patch after rendering (default is no translation). The translation is performed in screen (pixel) coordinates (i.e. after the Artist's transform is applied).

transOffset : `~.transforms.Transform`, default: `.IdentityTransform`

A single transform which will be applied to each offsets vector before it is used.

norm : `~.colors.Normalize`, optional

Forwarded to .ScalarMappable . The default of None means that the first draw call will set vmin and vmax using the minimum and maximum values of the data.

cmap : `~.colors.Colormap`, optional

Forwarded to .ScalarMappable . The default of None will result in image.cmap being used.

hatch : str, optional

Hatching pattern to use in filled paths, if any. Valid strings are ['/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*']. See /gallery/shapes_and_collections/hatch_style_reference for the meaning of each hatch type.

pickradius : float, default: 5.0

If pickradius <= 0 , then .Collection.contains will return True whenever the test point is inside of one of the polygons formed by the control points of a Path in the Collection. On the other hand, if it is greater than 0, then we instead check if the test point is contained in a stroke of width 2*pickradius following any of the Paths in the Collection.

urls : list of str, default: None

A URL for each patch to link to once drawn. Currently only works for the SVG backend. See /gallery/misc/hyperlinks_sgskip for examples.

zorder : float, default: 1

The drawing order, shared by all Patches in the Collection. See /gallery/misc/zorder_demo for all defaults and examples.

Examples

See :

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#77
type: <class 'function'>
Commit: