MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/matplotlib/collections.py:2101–2129  ·  view source on GitHub ↗

Parameters ---------- widths : array-like The lengths of the first axes (e.g., major axis lengths). heights : array-like The lengths of second axes. angles : array-like The angles of the first axes, degrees CCW from the x-a

(self, widths, heights, angles, *, units='points', **kwargs)

Source from the content-addressed store, hash-verified

2099 """A collection of ellipses, drawn using splines."""
2100
2101 def __init__(self, widths, heights, angles, *, units='points', **kwargs):
2102 """
2103 Parameters
2104 ----------
2105 widths : array-like
2106 The lengths of the first axes (e.g., major axis lengths).
2107 heights : array-like
2108 The lengths of second axes.
2109 angles : array-like
2110 The angles of the first axes, degrees CCW from the x-axis.
2111 units : {'points', 'inches', 'dots', 'width', 'height', 'x', 'y', 'xy'}
2112 The units in which majors and minors are given; 'width' and
2113 'height' refer to the dimensions of the axes, while 'x' and 'y'
2114 refer to the *offsets* data units. 'xy' differs from all others in
2115 that the angle as plotted varies with the aspect ratio, and equals
2116 the specified angle only when the aspect ratio is unity. Hence
2117 it behaves the same as the `~.patches.Ellipse` with
2118 ``axes.transData`` as its transform.
2119 **kwargs
2120 Forwarded to `Collection`.
2121 """
2122 super().__init__(**kwargs)
2123 self.set_widths(widths)
2124 self.set_heights(heights)
2125 self.set_angles(angles)
2126 self._units = units
2127 self.set_transform(transforms.IdentityTransform())
2128 self._transforms = np.empty((0, 3, 3))
2129 self._paths = [mpath.Path.unit_circle()]
2130
2131 def _set_transforms(self):
2132 """Calculate transforms immediately before drawing."""

Callers

nothing calls this directly

Calls 6

set_widthsMethod · 0.95
set_heightsMethod · 0.95
set_anglesMethod · 0.95
unit_circleMethod · 0.80
__init__Method · 0.45
set_transformMethod · 0.45

Tested by

no test coverage detected