<spanid="matplotlib-patheffects"></span><h1><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.patheffects</span></code><aclass="headerlink" href="#module-matplotlib.patheffects" title="Permalink to this headline">¶</a></h1>
<p>Defines classes for path effects. The path effects are supported in <aclass="reference internal" href="text_api.html#matplotlib.text.Text" title="matplotlib.text.Text"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Text</span></code></a>,
<emclass="property">class </em><codeclass="descclassname">matplotlib.patheffects.</code><codeclass="descname">AbstractPathEffect</code><spanclass="sig-paren">(</span><em><spanclass="n">offset</span><spanclass="o">=</span><spanclass="default_value">0.0, 0.0</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/patheffects.html#AbstractPathEffect"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.patheffects.AbstractPathEffect" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">draw_path</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">renderer</span></em>, <em><spanclass="n">gc</span></em>, <em><spanclass="n">tpath</span></em>, <em><spanclass="n">affine</span></em>, <em><spanclass="n">rgbFace</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/patheffects.html#AbstractPathEffect.draw_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.patheffects.AbstractPathEffect.draw_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Derived should override this method. The arguments are the same
as <aclass="reference internal" href="backend_bases_api.html#matplotlib.backend_bases.RendererBase.draw_path" title="matplotlib.backend_bases.RendererBase.draw_path"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">matplotlib.backend_bases.RendererBase.draw_path()</span></code></a>
except the first argument is a renderer.</p>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.patheffects.Normal">
<emclass="property">class </em><codeclass="descclassname">matplotlib.patheffects.</code><codeclass="descname">Normal</code><spanclass="sig-paren">(</span><em><spanclass="n">offset</span><spanclass="o">=</span><spanclass="default_value">0.0, 0.0</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/patheffects.html#Normal"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.patheffects.Normal" title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">matplotlib.patheffects.</code><codeclass="descname">PathEffectRenderer</code><spanclass="sig-paren">(</span><em><spanclass="n">path_effects</span></em>, <em><spanclass="n">renderer</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/patheffects.html#PathEffectRenderer"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.patheffects.PathEffectRenderer" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">copy_with_path_effect</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">path_effects</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/patheffects.html#PathEffectRenderer.copy_with_path_effect"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.patheffects.PathEffectRenderer.copy_with_path_effect" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">draw_markers</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">gc</span></em>, <em><spanclass="n">marker_path</span></em>, <em><spanclass="n">marker_trans</span></em>, <em><spanclass="n">path</span></em>, <em><spanclass="o">*</span><spanclass="n">args</span></em>, <em><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/patheffects.html#PathEffectRenderer.draw_markers"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.patheffects.PathEffectRenderer.draw_markers" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw a marker at each of the vertices in path.</p>
<p>This includes all vertices, including control points on curves.
To avoid that behavior, those vertices should be removed before
calling this function.</p>
<p>This provides a fallback implementation of draw_markers that
makes multiple calls to <aclass="reference internal" href="#matplotlib.patheffects.PathEffectRenderer.draw_path" title="matplotlib.patheffects.PathEffectRenderer.draw_path"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw_path()</span></code></a>. Some backends may
want to override this method in order to draw the marker only
<codeclass="descname">draw_path</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">gc</span></em>, <em><spanclass="n">tpath</span></em>, <em><spanclass="n">affine</span></em>, <em><spanclass="n">rgbFace</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/patheffects.html#PathEffectRenderer.draw_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.patheffects.PathEffectRenderer.draw_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw a <aclass="reference internal" href="path_api.html#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code></a> instance using the given affine transform.</p>
<codeclass="descname">draw_path_collection</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">gc</span></em>, <em><spanclass="n">master_transform</span></em>, <em><spanclass="n">paths</span></em>, <em><spanclass="o">*</span><spanclass="n">args</span></em>, <em><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/patheffects.html#PathEffectRenderer.draw_path_collection"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.patheffects.PathEffectRenderer.draw_path_collection" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw a collection of paths selecting drawing properties from
the lists <em>facecolors</em>, <em>edgecolors</em>, <em>linewidths</em>,
<em>linestyles</em> and <em>antialiaseds</em>. <em>offsets</em> is a list of
offsets to apply to each of the paths. The offsets in
<em>offsets</em> are first transformed by <em>offsetTrans</em> before being
applied.</p>
<p><em>offset_position</em> may be either "screen" or "data" depending on the
space that the offsets are in; "data" is deprecated.</p>
<p>This provides a fallback implementation of
<aclass="reference internal" href="#matplotlib.patheffects.PathEffectRenderer.draw_path_collection" title="matplotlib.patheffects.PathEffectRenderer.draw_path_collection"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw_path_collection()</span></code></a> that makes multiple calls to
<aclass="reference internal" href="#matplotlib.patheffects.PathEffectRenderer.draw_path" title="matplotlib.patheffects.PathEffectRenderer.draw_path"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw_path()</span></code></a>. Some backends may want to override this in
order to render each set of path data only once, and then
reference that path multiple times with the different offsets,
colors, styles etc. The generator methods
<codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">_iter_collection_raw_paths()</span></code> and
<codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">_iter_collection()</span></code> are provided to help with (and
standardize) the implementation across backends. It is highly
recommended to use those generators, so that changes to the
behavior of <aclass="reference internal" href="#matplotlib.patheffects.PathEffectRenderer.draw_path_collection" title="matplotlib.patheffects.PathEffectRenderer.draw_path_collection"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw_path_collection()</span></code></a> can be made globally.</p>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.patheffects.PathPatchEffect">
<emclass="property">class </em><codeclass="descclassname">matplotlib.patheffects.</code><codeclass="descname">PathPatchEffect</code><spanclass="sig-paren">(</span><em><spanclass="n">offset</span><spanclass="o">=</span><spanclass="default_value">0, 0</span></em>, <em><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/patheffects.html#PathPatchEffect"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.patheffects.PathPatchEffect" title="Permalink to this definition">¶</a></dt>
<p>Draws a <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> instance whose Path comes from the original
A value of <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code> takes the original artist's color
with a scale factor of <em>rho</em>.</p>
</dd>
<dt><strong>alpha</strong><spanclass="classifier">float, default: 0.3</span></dt><dd><p>The alpha transparency of the created shadow patch.</p>
</dd>
<dt><strong>rho</strong><spanclass="classifier">float, default: 0.3</span></dt><dd><p>A scale factor to apply to the rgbFace color if <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">shadow_rgbFace</span></code>
is <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>.</p>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>Extra keywords are stored and passed through to
<dt><strong>rho</strong><spanclass="classifier">float, default: 0.3</span></dt><dd><p>A scale factor to apply to the rgbFace color if <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">shadow_rgbFace</span></code>
is not specified.</p>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>Extra keywords are stored and passed through to
<dt><strong>rho</strong><spanclass="classifier">float, default: 0.3</span></dt><dd><p>A scale factor to apply to the rgbFace color if <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">shadow_rgbFace</span></code>
is not specified.</p>
</dd>
<dt><strong>**kwargs</strong></dt><dd><p>Extra keywords are stored and passed through to
<codeclass="descname">draw_path</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">renderer</span></em>, <em><spanclass="n">gc</span></em>, <em><spanclass="n">tpath</span></em>, <em><spanclass="n">affine</span></em>, <em><spanclass="n">rgbFace</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.patheffects.withSimplePatchShadow.draw_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Overrides the standard draw_path to add the shadow offset and
necessary color changes for the shadow.</p>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.patheffects.withStroke">
<emclass="property">class </em><codeclass="descclassname">matplotlib.patheffects.</code><codeclass="descname">withStroke</code><spanclass="sig-paren">(</span><em><spanclass="n">offset</span><spanclass="o">=</span><spanclass="default_value">0, 0</span></em>, <em><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.patheffects.withStroke" title="Permalink to this definition">¶</a></dt>