matplotlib 3.5.1

Parameters
__init__(self, vertices, codes=None, _interpolation_steps=1, closed=False, readonly=False)

Parameters

vertices : (N, 2) array-like

The path vertices, as an array, masked array or sequence of pairs. Masked values, if any, will be converted to NaNs, which are then handled correctly by the Agg PathIterator and other consumers of path data, such as iter_segments .

codes : array-like or None, optional

N-length array of integers representing the codes of the path. If not None, codes must be the same length as vertices. If None, vertices will be treated as a series of line segments.

_interpolation_steps : int, optional

Used as a hint to certain projections, such as Polar, that this path should be linearly interpolated immediately before drawing. This attribute is primarily an implementation detail and is not intended for public use.

closed : bool, optional

If codes is None and closed is True, vertices will be treated as line segments of a closed polygon. Note that the last vertex will then be ignored (as the corresponding code will be set to CLOSEPOLY).

readonly : bool, optional

Makes the path behave in an immutable way and sets the vertices and codes as read-only arrays.

Create a new path with the given vertices and codes.

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/path.py#99
type: <class 'function'>
Commit: