<divid="unreleased-message"> You are reading an old version of the documentation (v3.2.2). For the latest version see <ahref="https://matplotlib.org/stable/api/path_api.html">https://matplotlib.org/stable/api/path_api.html</a></div>
<spanid="matplotlib-path"></span><h1><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.path</span></code><aclass="headerlink" href="#module-matplotlib.path" title="Permalink to this headline">¶</a></h1>
<p>A module for dealing with the polylines used throughout Matplotlib.</p>
<p>The primary class for polyline handling in Matplotlib is <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a>. Almost all
vector drawing makes use of <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a>s somewhere in the drawing pipeline.</p>
<p>Whilst a <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> instance itself cannot be drawn, some <aclass="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a> subclasses,
such as <aclass="reference internal" href="_as_gen/matplotlib.patches.PathPatch.html#matplotlib.patches.PathPatch" title="matplotlib.patches.PathPatch"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">PathPatch</span></code></a> and <aclass="reference internal" href="collections_api.html#matplotlib.collections.PathCollection" title="matplotlib.collections.PathCollection"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">PathCollection</span></code></a>, can be used for convenient <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a>
visualisation.</p>
<dlclass="py class">
<dtid="matplotlib.path.Path">
<emclass="property">class </em><codeclass="descclassname">matplotlib.path.</code><codeclass="descname">Path</code><spanclass="sig-paren">(</span><em><spanclass="n">vertices</span></em>, <em><spanclass="n">codes</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">_interpolation_steps</span><spanclass="o">=</span><spanclass="default_value">1</span></em>, <em><spanclass="n">closed</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">readonly</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path" title="Permalink to this definition">¶</a></dt>
<p>A series of possibly disconnected, possibly closed, line and curve
segments.</p>
<p>The underlying storage is made up of two parallel numpy arrays:</p>
<ulclass="simple">
<li><em>vertices</em>: an Nx2 float array of vertices</li>
<li><em>codes</em>: an N-length uint8 array of vertex types, or None</li>
</ul>
<p>These two arrays always have the same length in the first
dimension. For example, to represent a cubic curve, you must
provide three vertices as well as three codes <codeclass="docutils literal notranslate"><spanclass="pre">CURVE3</span></code>.</p>
<p>The code types are:</p>
<ulclass="simple">
<li><dlclass="first docutils">
<dt><codeclass="docutils literal notranslate"><spanclass="pre">STOP</span></code><spanclass="classifier">1 vertex (ignored)</span></dt><dd>A marker for the end of the entire path (currently not required and
ignored)</dd>
</dl>
</li>
<li><dlclass="first docutils">
<dt><codeclass="docutils literal notranslate"><spanclass="pre">MOVETO</span></code><spanclass="classifier">1 vertex</span></dt><dd>Pick up the pen and move to the given vertex.</dd>
</dl>
</li>
<li><dlclass="first docutils">
<dt><codeclass="docutils literal notranslate"><spanclass="pre">LINETO</span></code><spanclass="classifier">1 vertex</span></dt><dd>Draw a line from the current position to the given vertex.</dd>
</dl>
</li>
<li><dlclass="first docutils">
<dt><codeclass="docutils literal notranslate"><spanclass="pre">CURVE3</span></code><spanclass="classifier">1 control point, 1 endpoint</span></dt><dd>Draw a quadratic Bezier curve from the current position, with the given
control point, to the given end point.</dd>
</dl>
</li>
<li><dlclass="first docutils">
<dt><codeclass="docutils literal notranslate"><spanclass="pre">CURVE4</span></code><spanclass="classifier">2 control points, 1 endpoint</span></dt><dd>Draw a cubic Bezier curve from the current position, with the given
control points, to the given end point.</dd>
</dl>
</li>
<li><dlclass="first docutils">
<dt><codeclass="docutils literal notranslate"><spanclass="pre">CLOSEPOLY</span></code><spanclass="classifier">1 vertex (ignored)</span></dt><dd>Draw a line segment to the start point of the current polyline.</dd>
</dl>
</li>
</ul>
<p>If <em>codes</em> is None, it is interpreted as a <codeclass="docutils literal notranslate"><spanclass="pre">MOVETO</span></code> followed by a series
of <codeclass="docutils literal notranslate"><spanclass="pre">LINETO</span></code>.</p>
<p>Users of Path objects should not access the vertices and codes arrays
directly. Instead, they should use <aclass="reference internal" href="#matplotlib.path.Path.iter_segments" title="matplotlib.path.Path.iter_segments"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">iter_segments</span></code></a> or <aclass="reference internal" href="#matplotlib.path.Path.cleaned" title="matplotlib.path.Path.cleaned"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">cleaned</span></code></a> to get the
vertex/code pairs. This helps, in particular, to consistently handle the
case of <em>codes</em> being None.</p>
<p>Some behavior of Path objects can be controlled by rcParams. See the
rcParams whose keys start with 'path.'.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">The vertices and codes arrays should be treated as
immutable -- there are a number of optimizations and assumptions
made up front in the constructor that will not change when the
data changes.</p>
</div>
<p>Create a new path with the given vertices and codes.</p>
<dt><strong>codes</strong><spanclass="classifier">array-like or None, optional</span></dt><dd><p>n-length array integers representing the codes of the path.
If not None, codes must be the same length as vertices.
If None, <em>vertices</em> will be treated as a series of line segments.</p>
</dd>
<dt><strong>_interpolation_steps</strong><spanclass="classifier">int, optional</span></dt><dd><p>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.</p>
</dd>
<dt><strong>closed</strong><spanclass="classifier">bool, optional</span></dt><dd><p>If <em>codes</em> is None and closed is True, vertices will be treated as
line segments of a closed polygon.</p>
</dd>
<dt><strong>readonly</strong><spanclass="classifier">bool, optional</span></dt><dd><p>Makes the path behave in an immutable way and sets the vertices
and codes as read-only arrays.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<dlclass="py attribute">
<dtid="matplotlib.path.Path.CLOSEPOLY">
<codeclass="descname">CLOSEPOLY</code><emclass="property"> = 79</em><aclass="headerlink" href="#matplotlib.path.Path.CLOSEPOLY" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py attribute">
<dtid="matplotlib.path.Path.CURVE3">
<codeclass="descname">CURVE3</code><emclass="property"> = 3</em><aclass="headerlink" href="#matplotlib.path.Path.CURVE3" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py attribute">
<dtid="matplotlib.path.Path.CURVE4">
<codeclass="descname">CURVE4</code><emclass="property"> = 4</em><aclass="headerlink" href="#matplotlib.path.Path.CURVE4" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py attribute">
<dtid="matplotlib.path.Path.LINETO">
<codeclass="descname">LINETO</code><emclass="property"> = 2</em><aclass="headerlink" href="#matplotlib.path.Path.LINETO" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py attribute">
<dtid="matplotlib.path.Path.MOVETO">
<codeclass="descname">MOVETO</code><emclass="property"> = 1</em><aclass="headerlink" href="#matplotlib.path.Path.MOVETO" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">NUM_VERTICES_FOR_CODE</code><emclass="property"> = {0: 1, 1: 1, 2: 1, 3: 2, 4: 3, 79: 1}</em><aclass="headerlink" href="#matplotlib.path.Path.NUM_VERTICES_FOR_CODE" title="Permalink to this definition">¶</a></dt>
<dd><p>A dictionary mapping Path codes to the number of vertices that the
code expects.</p>
</dd></dl>
<dlclass="py attribute">
<dtid="matplotlib.path.Path.STOP">
<codeclass="descname">STOP</code><emclass="property"> = 0</em><aclass="headerlink" href="#matplotlib.path.Path.STOP" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.arc">
<emclass="property">classmethod </em><codeclass="descname">arc</code><spanclass="sig-paren">(</span><em><spanclass="n">theta1</span></em>, <em><spanclass="n">theta2</span></em>, <em><spanclass="n">n</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">is_wedge</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.arc"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.arc" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the unit circle arc from angles <em>theta1</em> to <em>theta2</em> (in
degrees).</p>
<p><em>theta2</em> is unwrapped to produce the shortest arc within 360 degrees.
That is, if <em>theta2</em> > <em>theta1</em> + 360, the arc will be from <em>theta1</em> to
<em>theta2</em> - 360 and not a full circle plus some extra overlap.</p>
<p>If <em>n</em> is provided, it is the number of spline segments to make.
If <em>n</em> is not provided, the number of spline segments is
determined based on the delta between <em>theta1</em> and <em>theta2</em>.</p>
<blockquote>
<div>Masionobe, L. 2003. <aclass="reference external" href="http://www.spaceroots.org/documents/ellipse/index.html">Drawing an elliptical arc using
polylines, quadratic or cubic Bezier curves</a>.</div></blockquote>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.circle">
<emclass="property">classmethod </em><codeclass="descname">circle</code><spanclass="sig-paren">(</span><em><spanclass="n">center</span><spanclass="o">=</span><spanclass="default_value">0.0, 0.0</span></em>, <em><spanclass="n">radius</span><spanclass="o">=</span><spanclass="default_value">1.0</span></em>, <em><spanclass="n">readonly</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.circle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.circle" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> representing a circle of a given radius and center.</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>center</strong><spanclass="classifier">pair of floats</span></dt><dd><p>The center of the circle. Default <codeclass="docutils literal notranslate"><spanclass="pre">(0,</span><spanclass="pre">0)</span></code>.</p>
</dd>
<dt><strong>radius</strong><spanclass="classifier">float</span></dt><dd><p>The radius of the circle. Default is 1.</p>
</dd>
<dt><strong>readonly</strong><spanclass="classifier">bool</span></dt><dd><p>Whether the created path should have the "readonly" argument
set when creating the Path instance.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<pclass="rubric">Notes</p>
<p>The circle is approximated using 8 cubic Bezier curves, as described in</p>
<blockquote>
<div>Lancaster, Don. <aclass="reference external" href="http://www.tinaja.com/glib/ellipse4.pdf">Approximating a Circle or an Ellipse Using Four
Bezier Cubic Splines</a>.</div></blockquote>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.cleaned">
<codeclass="descname">cleaned</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">transform</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">remove_nans</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">clip</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">quantize</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">simplify</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">curves</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">stroke_width</span><spanclass="o">=</span><spanclass="default_value">1.0</span></em>, <em><spanclass="n">snap</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">sketch</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.cleaned"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.cleaned" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new Path with vertices and codes cleaned according to the
parameters.</p>
<divclass="admonition seealso">
<pclass="first admonition-title">See also</p>
<dlclass="last docutils">
<dt><aclass="reference internal" href="#matplotlib.path.Path.iter_segments" title="matplotlib.path.Path.iter_segments"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path.iter_segments</span></code></a></dt><dd>for details of the keyword arguments.</dd>
</dl>
</div>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.clip_to_bbox">
<codeclass="descname">clip_to_bbox</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">bbox</span></em>, <em><spanclass="n">inside</span><spanclass="o">=</span><spanclass="default_value">True</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.clip_to_bbox"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.clip_to_bbox" title="Permalink to this definition">¶</a></dt>
<dd><p>Clip the path to the given bounding box.</p>
<p>The path must be made up of one or more closed polygons. This
algorithm will not behave correctly for unclosed paths.</p>
<p>If <em>inside</em> is <aclass="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">True</span></code></a>, clip to the inside of the box, otherwise
to the outside of the box.</p>
</dd></dl>
<dlclass="py attribute">
<dtid="matplotlib.path.Path.code_type">
<codeclass="descname">code_type</code><aclass="headerlink" href="#matplotlib.path.Path.code_type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">numpy.uint8</span></code></p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.codes">
<emclass="property">property </em><codeclass="descname">codes</code><aclass="headerlink" href="#matplotlib.path.Path.codes" title="Permalink to this definition">¶</a></dt>
<dd><p>The list of codes in the <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> as a 1-D numpy array. Each
or <aclass="reference internal" href="#matplotlib.path.Path.CLOSEPOLY" title="matplotlib.path.Path.CLOSEPOLY"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">CLOSEPOLY</span></code></a>. For codes that correspond to more than one
vertex (<aclass="reference internal" href="#matplotlib.path.Path.CURVE3" title="matplotlib.path.Path.CURVE3"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">CURVE3</span></code></a> and <aclass="reference internal" href="#matplotlib.path.Path.CURVE4" title="matplotlib.path.Path.CURVE4"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">CURVE4</span></code></a>), that code will be repeated so
that the length of <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">self.vertices</span></code> and <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">self.codes</span></code> is always
the same.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.contains_path">
<codeclass="descname">contains_path</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">path</span></em>, <em><spanclass="n">transform</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.contains_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.contains_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns whether this (closed) path completely contains the given path.</p>
<p>If <em>transform</em> is not <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>, the path will be transformed before
performing the test.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.contains_point">
<codeclass="descname">contains_point</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">point</span></em>, <em><spanclass="n">transform</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">radius</span><spanclass="o">=</span><spanclass="default_value">0.0</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.contains_point"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.contains_point" title="Permalink to this definition">¶</a></dt>
<dd><p>Return whether the (closed) path contains the given point.</p>
<dt><strong>point</strong><spanclass="classifier">(float, float)</span></dt><dd><p>The point (x, y) to check.</p>
</dd>
<dt><strong>transform</strong><spanclass="classifier"><aclass="reference internal" href="transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.transforms.Transform</span></code></a>, optional</span></dt><dd><p>If not <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>, <em>point</em> will be compared to <codeclass="docutils literal notranslate"><spanclass="pre">self</span></code> transformed
by <em>transform</em>; i.e. for a correct check, <em>transform</em> should
transform the path into the coordinate system of <em>point</em>.</p>
</dd>
<dt><strong>radius</strong><spanclass="classifier">float, default: 0</span></dt><dd><p>Add an additional margin on the path in coordinates of <em>point</em>.
The path is extended tangentially by <em>radius/2</em>; i.e. if you would
draw the path with a linewidth of <em>radius</em>, all points on the line
would still be considered to be contained in the area. Conversely,
negative values shrink the area: Points on the imaginary line
will be considered outside the area.</p>
</dd>
</dl>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><dlclass="first last docutils">
<dt>bool</dt><dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.contains_points">
<codeclass="descname">contains_points</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">points</span></em>, <em><spanclass="n">transform</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">radius</span><spanclass="o">=</span><spanclass="default_value">0.0</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.contains_points"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.contains_points" title="Permalink to this definition">¶</a></dt>
<dd><p>Return whether the (closed) path contains the given point.</p>
<dt><strong>points</strong><spanclass="classifier">(N, 2) array</span></dt><dd><p>The points to check. Columns contain x and y values.</p>
</dd>
<dt><strong>transform</strong><spanclass="classifier"><aclass="reference internal" href="transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.transforms.Transform</span></code></a>, optional</span></dt><dd><p>If not <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>, <em>points</em> will be compared to <codeclass="docutils literal notranslate"><spanclass="pre">self</span></code> transformed
by <em>transform</em>; i.e. for a correct check, <em>transform</em> should
transform the path into the coordinate system of <em>points</em>.</p>
</dd>
<dt><strong>radius</strong><spanclass="classifier">float, default: 0.</span></dt><dd><p>Add an additional margin on the path in coordinates of <em>points</em>.
The path is extended tangentially by <em>radius/2</em>; i.e. if you would
draw the path with a linewidth of <em>radius</em>, all points on the line
would still be considered to be contained in the area. Conversely,
negative values shrink the area: Points on the imaginary line
will be considered outside the area.</p>
</dd>
</dl>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><dlclass="first last docutils">
<dt>length-N bool array</dt><dd></dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.copy">
<codeclass="descname">copy</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.path.Path.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a shallow copy of the <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a>, which will share the
vertices and codes with the source <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a>.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.deepcopy">
<codeclass="descname">deepcopy</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">memo</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.path.Path.deepcopy" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a deepcopy of the <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a>. The <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> will not be
readonly, even if the source <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> is.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.get_extents">
<codeclass="descname">get_extents</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">transform</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.get_extents"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.get_extents" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the extents (<em>xmin</em>, <em>ymin</em>, <em>xmax</em>, <em>ymax</em>) of the path.</p>
<p>Unlike computing the extents on the <em>vertices</em> alone, this
algorithm will take into account the curves and deal with
control points appropriately.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.has_nonfinite">
<emclass="property">property </em><codeclass="descname">has_nonfinite</code><aclass="headerlink" href="#matplotlib.path.Path.has_nonfinite" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.hatch">
<emclass="property">static </em><codeclass="descname">hatch</code><spanclass="sig-paren">(</span><em><spanclass="n">hatchpattern</span></em>, <em><spanclass="n">density</span><spanclass="o">=</span><spanclass="default_value">6</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.hatch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.hatch" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a hatch specifier, <em>hatchpattern</em>, generates a Path that
can be used in a repeated hatching pattern. <em>density</em> is the
number of lines per unit square.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.interpolated">
<codeclass="descname">interpolated</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">steps</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.interpolated"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.interpolated" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a new path resampled to length N x steps. Does not
currently handle interpolating curves.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.intersects_bbox">
<codeclass="descname">intersects_bbox</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">bbox</span></em>, <em><spanclass="n">filled</span><spanclass="o">=</span><spanclass="default_value">True</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.intersects_bbox"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.intersects_bbox" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns whether this path intersects a given <aclass="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Bbox</span></code></a>.</p>
<p><em>filled</em>, when True, treats the path as if it was filled.
That is, if the path completely encloses the bounding box,
<p>The bounding box is always considered filled.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.intersects_path">
<codeclass="descname">intersects_path</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">other</span></em>, <em><spanclass="n">filled</span><spanclass="o">=</span><spanclass="default_value">True</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.intersects_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.intersects_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <em>True</em> if this path intersects another given path.</p>
<p><em>filled</em>, when True, treats the paths as if they were filled.
That is, if one path completely encloses the other,
<codeclass="descname">iter_segments</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">transform</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">remove_nans</span><spanclass="o">=</span><spanclass="default_value">True</span></em>, <em><spanclass="n">clip</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">snap</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">stroke_width</span><spanclass="o">=</span><spanclass="default_value">1.0</span></em>, <em><spanclass="n">simplify</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">curves</span><spanclass="o">=</span><spanclass="default_value">True</span></em>, <em><spanclass="n">sketch</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.iter_segments"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.iter_segments" title="Permalink to this definition">¶</a></dt>
<dd><p>Iterates over all of the curve segments in the path. Each iteration
returns a 2-tuple <codeclass="docutils literal notranslate"><spanclass="pre">(vertices,</span><spanclass="pre">code)</span></code>, where <codeclass="docutils literal notranslate"><spanclass="pre">vertices</span></code> is a
sequence of 1-3 coordinate pairs, and <codeclass="docutils literal notranslate"><spanclass="pre">code</span></code> is a <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> code.</p>
<p>Additionally, this method can provide a number of standard cleanups and
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>transform</strong><spanclass="classifier">None or <aclass="reference internal" href="transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Transform</span></code></a></span></dt><dd><p>If not None, the given affine transformation will be applied to the
path.</p>
</dd>
<dt><strong>remove_nans</strong><spanclass="classifier">bool, optional</span></dt><dd><p>Whether to remove all NaNs from the path and skip over them using
MOVETO commands.</p>
</dd>
<dt><strong>clip</strong><spanclass="classifier">None or (float, float, float, float), optional</span></dt><dd><p>If not None, must be a four-tuple (x1, y1, x2, y2)
defining a rectangle in which to clip the path.</p>
</dd>
<dt><strong>snap</strong><spanclass="classifier">None or bool, optional</span></dt><dd><p>If True, snap all nodes to pixels; if False, don't snap them.
If None, perform snapping if the path contains only segments
parallel to the x or y axes, and no more than 1024 of them.</p>
</dd>
<dt><strong>stroke_width</strong><spanclass="classifier">float, optional</span></dt><dd><p>The width of the stroke being drawn (used for path snapping).</p>
</dd>
<dt><strong>simplify</strong><spanclass="classifier">None or bool, optional</span></dt><dd><p>Whether to simplify the path by removing vertices
that do not affect its appearance. If None, use the
<aclass="reference internal" href="#matplotlib.path.Path.should_simplify" title="matplotlib.path.Path.should_simplify"><codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">should_simplify</span></code></a> attribute. See also <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=path.simplify#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["path.simplify"]</span></a></code> (default: True)
and <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=path.simplify_threshold#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["path.simplify_threshold"]</span></a></code> (default: 0.1111111111111111).</p>
</dd>
<dt><strong>curves</strong><spanclass="classifier">bool, optional</span></dt><dd><p>If True, curve segments will be returned as curve segments.
If False, all curves will be converted to line segments.</p>
</dd>
<dt><strong>sketch</strong><spanclass="classifier">None or sequence, optional</span></dt><dd><p>If not None, must be a 3-tuple of the form
(scale, length, randomness), representing the sketch parameters.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.make_compound_path">
<emclass="property">classmethod </em><codeclass="descname">make_compound_path</code><spanclass="sig-paren">(</span><em><spanclass="o">*</span><spanclass="n">args</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.make_compound_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.make_compound_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Make a compound path from a list of Path objects.</p>
<emclass="property">classmethod </em><codeclass="descname">make_compound_path_from_polys</code><spanclass="sig-paren">(</span><em><spanclass="n">XY</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.make_compound_path_from_polys"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.make_compound_path_from_polys" title="Permalink to this definition">¶</a></dt>
<dd><p>Make a compound path object to draw a number
of polygons with equal numbers of sides XY is a (numpolys x
numsides x 2) numpy array of vertices. Return object is a
<emclass="property">property </em><codeclass="descname">readonly</code><aclass="headerlink" href="#matplotlib.path.Path.readonly" title="Permalink to this definition">¶</a></dt>
<dd><p><aclass="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">True</span></code></a> if the <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> is read-only.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.should_simplify">
<emclass="property">property </em><codeclass="descname">should_simplify</code><aclass="headerlink" href="#matplotlib.path.Path.should_simplify" title="Permalink to this definition">¶</a></dt>
<dd><p><aclass="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">True</span></code></a> if the vertices array should be simplified.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.simplify_threshold">
<emclass="property">property </em><codeclass="descname">simplify_threshold</code><aclass="headerlink" href="#matplotlib.path.Path.simplify_threshold" title="Permalink to this definition">¶</a></dt>
<dd><p>The fraction of a pixel difference below which vertices will
be simplified out.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.to_polygons">
<codeclass="descname">to_polygons</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">transform</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">width</span><spanclass="o">=</span><spanclass="default_value">0</span></em>, <em><spanclass="n">height</span><spanclass="o">=</span><spanclass="default_value">0</span></em>, <em><spanclass="n">closed_only</span><spanclass="o">=</span><spanclass="default_value">True</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.to_polygons"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.to_polygons" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert this path to a list of polygons or polylines. Each
polygon/polyline is an Nx2 array of vertices. In other words,
each polygon has no <codeclass="docutils literal notranslate"><spanclass="pre">MOVETO</span></code> instructions or curves. This
is useful for displaying in backends that do not support
compound paths or Bezier curves.</p>
<p>If <em>width</em> and <em>height</em> are both non-zero then the lines will
be simplified so that vertices outside of (0, 0), (width,
height) will be clipped.</p>
<p>If <em>closed_only</em> is <aclass="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">True</span></code></a> (default), only closed polygons,
with the last point being the same as the first point, will be
returned. Any unclosed polylines in the path will be
explicitly closed. If <em>closed_only</em> is <aclass="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">False</span></code></a>, any unclosed
polygons in the path will be returned as unclosed polygons,
and the closed polygons will be returned explicitly closed by
setting the last point to the same as the first point.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.transformed">
<codeclass="descname">transformed</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">transform</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.transformed"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.transformed" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a transformed copy of the path.</p>
<divclass="admonition seealso">
<pclass="first admonition-title">See also</p>
<dlclass="last docutils">
<dt><aclass="reference internal" href="transformations.html#matplotlib.transforms.TransformedPath" title="matplotlib.transforms.TransformedPath"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.transforms.TransformedPath</span></code></a></dt><dd>A specialized path class that will cache the transformed result and automatically update when the transform changes.</dd>
</dl>
</div>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.unit_circle">
<emclass="property">classmethod </em><codeclass="descname">unit_circle</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.unit_circle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.unit_circle" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the readonly <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Path</span></code></a> of the unit circle.</p>
<p>For most cases, <aclass="reference internal" href="#matplotlib.path.Path.circle" title="matplotlib.path.Path.circle"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">Path.circle()</span></code></a> will be what you want.</p>
<emclass="property">classmethod </em><codeclass="descname">unit_circle_righthalf</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.unit_circle_righthalf"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.unit_circle_righthalf" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> of the right half of a unit circle.</p>
<p>See <aclass="reference internal" href="#matplotlib.path.Path.circle" title="matplotlib.path.Path.circle"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path.circle</span></code></a> for the reference on the approximation used.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.unit_rectangle">
<emclass="property">classmethod </em><codeclass="descname">unit_rectangle</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.unit_rectangle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.unit_rectangle" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> instance of the unit rectangle from (0, 0) to (1, 1).</p>
<emclass="property">classmethod </em><codeclass="descname">unit_regular_asterisk</code><spanclass="sig-paren">(</span><em><spanclass="n">numVertices</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.unit_regular_asterisk"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.unit_regular_asterisk" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Path</span></code></a> for a unit regular asterisk with the given
numVertices and radius of 1.0, centered at (0, 0).</p>
<emclass="property">classmethod </em><codeclass="descname">unit_regular_polygon</code><spanclass="sig-paren">(</span><em><spanclass="n">numVertices</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.unit_regular_polygon"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.unit_regular_polygon" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Path</span></code></a> instance for a unit regular polygon with the
given <em>numVertices</em> and radius of 1.0, centered at (0, 0).</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.unit_regular_star">
<emclass="property">classmethod </em><codeclass="descname">unit_regular_star</code><spanclass="sig-paren">(</span><em><spanclass="n">numVertices</span></em>, <em><spanclass="n">innerCircle</span><spanclass="o">=</span><spanclass="default_value">0.5</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.unit_regular_star"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.unit_regular_star" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Path</span></code></a> for a unit regular star with the given
numVertices and radius of 1.0, centered at (0, 0).</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.vertices">
<emclass="property">property </em><codeclass="descname">vertices</code><aclass="headerlink" href="#matplotlib.path.Path.vertices" title="Permalink to this definition">¶</a></dt>
<dd><p>The list of vertices in the <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> as an Nx2 numpy array.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.path.Path.wedge">
<emclass="property">classmethod </em><codeclass="descname">wedge</code><spanclass="sig-paren">(</span><em><spanclass="n">theta1</span></em>, <em><spanclass="n">theta2</span></em>, <em><spanclass="n">n</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#Path.wedge"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.Path.wedge" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the unit circle wedge from angles <em>theta1</em> to <em>theta2</em> (in
degrees).</p>
<p><em>theta2</em> is unwrapped to produce the shortest wedge within 360 degrees.
That is, if <em>theta2</em> > <em>theta1</em> + 360, the wedge will be from <em>theta1</em>
to <em>theta2</em> - 360 and not a full circle plus some extra overlap.</p>
<p>If <em>n</em> is provided, it is the number of spline segments to make.
If <em>n</em> is not provided, the number of spline segments is
determined based on the delta between <em>theta1</em> and <em>theta2</em>.</p>
<p>See <aclass="reference internal" href="#matplotlib.path.Path.arc" title="matplotlib.path.Path.arc"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path.arc</span></code></a> for the reference on the approximation used.</p>
<codeclass="descclassname">matplotlib.path.</code><codeclass="descname">get_path_collection_extents</code><spanclass="sig-paren">(</span><em><spanclass="n">master_transform</span></em>, <em><spanclass="n">paths</span></em>, <em><spanclass="n">transforms</span></em>, <em><spanclass="n">offsets</span></em>, <em><spanclass="n">offset_transform</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#get_path_collection_extents"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.get_path_collection_extents" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a sequence of <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a>s, <aclass="reference internal" href="transformations.html#matplotlib.transforms.Transform" title="matplotlib.transforms.Transform"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Transform</span></code></a>s objects, and offsets, as
found in a <aclass="reference internal" href="collections_api.html#matplotlib.collections.PathCollection" title="matplotlib.collections.PathCollection"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">PathCollection</span></code></a>, returns the bounding box that encapsulates
<dt><strong>offset_transform</strong><spanclass="classifier"><aclass="reference internal" href="transformations.html#matplotlib.transforms.Affine2D" title="matplotlib.transforms.Affine2D"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Affine2D</span></code></a></span></dt><dd><p>Transform applied to the offsets before offsetting the path.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<pclass="rubric">Notes</p>
<p>The way that <em>paths</em>, <em>transforms</em> and <em>offsets</em> are combined
follows the same method as for collections: Each is iterated over
independently, so if you have 3 paths, 2 transforms and 1 offset,
their combinations are as follows:</p>
<blockquote>
<div>(A, A, A), (B, B, A), (C, A, A)</div></blockquote>
</dd></dl>
<dlclass="py function">
<dtid="matplotlib.path.get_paths_extents">
<codeclass="descclassname">matplotlib.path.</code><codeclass="descname">get_paths_extents</code><spanclass="sig-paren">(</span><em><spanclass="n">paths</span></em>, <em><spanclass="n">transforms</span><spanclass="o">=</span><spanclass="default_value">[]</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/path.html#get_paths_extents"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.path.get_paths_extents" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Given a sequence of <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Path</span></code></a> objects and optional
<p><em>paths</em> is a sequence of <aclass="reference internal" href="#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Path</span></code></a> instances.</p>
<p><em>transforms</em> is an optional sequence of
<aclass="reference internal" href="transformations.html#matplotlib.transforms.Affine2D" title="matplotlib.transforms.Affine2D"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Affine2D</span></code></a> instances to apply to
each path.</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.1.</span></p>