<divid="unreleased-message"> You are reading an old version of the documentation (v3.3.2). For the latest version see <ahref="https://matplotlib.org/stable/api/backend_ps_api.html">https://matplotlib.org/stable/api/backend_ps_api.html</a></div>
<codeclass="descclassname">matplotlib.backends.backend_ps.</code><codeclass="descname">FigureCanvas</code><aclass="headerlink" href="#matplotlib.backends.backend_ps.FigureCanvas" title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">matplotlib.backends.backend_ps.</code><codeclass="descname">FigureCanvasPS</code><spanclass="sig-paren">(</span><em><spanclass="n">figure</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#FigureCanvasPS"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.FigureCanvasPS" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">fixed_dpi</code><emclass="property"> = 72</em><aclass="headerlink" href="#matplotlib.backends.backend_ps.FigureCanvasPS.fixed_dpi" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_default_filetype</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#FigureCanvasPS.get_default_filetype"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.FigureCanvasPS.get_default_filetype" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the default savefig file format as specified in
<emclass="property">class </em><codeclass="descclassname">matplotlib.backends.backend_ps.</code><codeclass="descname">GraphicsContextPS</code><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#GraphicsContextPS"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.GraphicsContextPS" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_capstyle</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#GraphicsContextPS.get_capstyle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.GraphicsContextPS.get_capstyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the capstyle as a string in ('butt', 'round', 'projecting').</p>
<codeclass="descname">get_joinstyle</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#GraphicsContextPS.get_joinstyle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.GraphicsContextPS.get_joinstyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the line join style as one of ('miter', 'round', 'bevel').</p>
<emclass="property">class </em><codeclass="descclassname">matplotlib.backends.backend_ps.</code><codeclass="descname">PsBackendHelper</code><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#PsBackendHelper"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.PsBackendHelper" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">create_hatch</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">hatch</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#RendererPS.create_hatch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.create_hatch" title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>points</strong><spanclass="classifier">array-like, shape=(N, 3, 2)</span></dt><dd><p>Array of <em>N</em> (x, y) points for the triangles.</p>
</dd>
<dt><strong>colors</strong><spanclass="classifier">array-like, shape=(N, 3, 4)</span></dt><dd><p>Array of <em>N</em> RGBA colors for each point of the triangles.</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></span></dt><dd><p>An affine transform to apply to the points.</p>
<dt><strong>x</strong><spanclass="classifier">scalar</span></dt><dd><p>The distance in physical units (i.e., dots or pixels) from the left
hand side of the canvas.</p>
</dd>
<dt><strong>y</strong><spanclass="classifier">scalar</span></dt><dd><p>The distance in physical units (i.e., dots or pixels) from the
bottom side of the canvas.</p>
</dd>
<dt><strong>im</strong><spanclass="classifier">array-like, shape=(N, M, 4), dtype=np.uint8</span></dt><dd><p>An array of RGBA pixels.</p>
</dd>
<dt><strong>transform</strong><spanclass="classifier"><aclass="reference internal" href="transformations.html#matplotlib.transforms.Affine2DBase" title="matplotlib.transforms.Affine2DBase"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.transforms.Affine2DBase</span></code></a></span></dt><dd><p>If and only if the concrete backend is written such that
transformation (i.e., an <aclass="reference internal" href="transformations.html#matplotlib.transforms.Affine2DBase" title="matplotlib.transforms.Affine2DBase"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Affine2DBase</span></code></a>) <em>may</em> be passed to
<aclass="reference internal" href="#matplotlib.backends.backend_ps.RendererPS.draw_image" title="matplotlib.backends.backend_ps.RendererPS.draw_image"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw_image()</span></code></a>. The translation vector of the transformation
is given in physical units (i.e., dots or pixels). Note that
the transformation does not override <em>x</em> and <em>y</em>, and has to be
applied <em>before</em> translating the result by <em>x</em> and <em>y</em> (this can
be accomplished by adding <em>x</em> and <em>y</em> to the translation vector
<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="n">trans</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/backends/backend_ps.html#RendererPS.draw_markers"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.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.backends.backend_ps.RendererPS.draw_path" title="matplotlib.backends.backend_ps.RendererPS.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">path</span></em>, <em><spanclass="n">transform</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/backends/backend_ps.html#RendererPS.draw_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.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>
<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.backends.backend_ps.RendererPS.draw_path_collection" title="matplotlib.backends.backend_ps.RendererPS.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.backends.backend_ps.RendererPS.draw_path" title="matplotlib.backends.backend_ps.RendererPS.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.backends.backend_ps.RendererPS.draw_path_collection" title="matplotlib.backends.backend_ps.RendererPS.draw_path_collection"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw_path_collection()</span></code></a> can be made globally.</p>
<dt><strong>angle</strong><spanclass="classifier">float</span></dt><dd><p>The rotation angle in degrees anti-clockwise.</p>
</dd>
<dt><strong>mtext</strong><spanclass="classifier"><aclass="reference internal" href="text_api.html#matplotlib.text.Text" title="matplotlib.text.Text"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">matplotlib.text.Text</span></code></a></span></dt><dd><p>The original text object to be rendered.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<pclass="rubric">Notes</p>
<p><strong>Note for backend implementers:</strong></p>
<p>When you are trying to determine if you have gotten your bounding box
right (which is what enables the text layout/alignment to work
properly), it helps to change the line in text.py:</p>
<codeclass="descname">get_image_magnification</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#RendererPS.get_image_magnification"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.get_image_magnification" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the factor by which to magnify images passed to draw_image.
Allows a backend to have images at a different resolution to other
<codeclass="descname">merge_used_characters</code><spanclass="sig-paren">(</span><em><spanclass="n">self</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/backends/backend_ps.html#RendererPS.merge_used_characters"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.merge_used_characters" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>]</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.3: </span></p>
<codeclass="descname">new_gc</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#RendererPS.new_gc"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.new_gc" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an instance of a <aclass="reference internal" href="backend_bases_api.html#matplotlib.backend_bases.GraphicsContextBase" title="matplotlib.backend_bases.GraphicsContextBase"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">GraphicsContextBase</span></code></a>.</p>
<codeclass="descname">set_linecap</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">linecap</span></em>, <em><spanclass="n">store</span><spanclass="o">=</span><spanclass="default_value">True</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#RendererPS.set_linecap"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.set_linecap" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_linejoin</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">linejoin</span></em>, <em><spanclass="n">store</span><spanclass="o">=</span><spanclass="default_value">True</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#RendererPS.set_linejoin"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.set_linejoin" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_linewidth</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">linewidth</span></em>, <em><spanclass="n">store</span><spanclass="o">=</span><spanclass="default_value">True</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#RendererPS.set_linewidth"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.set_linewidth" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">track_characters</code><spanclass="sig-paren">(</span><em><spanclass="n">self</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/backends/backend_ps.html#RendererPS.track_characters"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.track_characters" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Keep track of which characters are required from each font.</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.3.</span></p>
<emclass="property">property </em><codeclass="descname">used_characters</code><aclass="headerlink" href="#matplotlib.backends.backend_ps.RendererPS.used_characters" title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">matplotlib.backends.backend_ps.</code><codeclass="descname">get_bbox_header</code><spanclass="sig-paren">(</span><em><spanclass="n">lbrt</span></em>, <em><spanclass="n">rotated</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#get_bbox_header"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.get_bbox_header" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a postscript header string for the given bbox lbrt=(l, b, r, t).
<codeclass="descclassname">matplotlib.backends.backend_ps.</code><codeclass="descname">gs_distill</code><spanclass="sig-paren">(</span><em><spanclass="n">tmpfile</span></em>, <em><spanclass="n">eps</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">ptype</span><spanclass="o">=</span><spanclass="default_value">'letter'</span></em>, <em><spanclass="n">bbox</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">rotated</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#gs_distill"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.gs_distill" title="Permalink to this definition">¶</a></dt>
<dd><p>Use ghostscript's pswrite or epswrite device to distill a file.
This yields smaller files without illegal encapsulated postscript
operators. The output is low-level, converting text to outlines.</p>
</dd></dl>
<dlclass="py function">
<dtid="matplotlib.backends.backend_ps.pstoeps">
<codeclass="descclassname">matplotlib.backends.backend_ps.</code><codeclass="descname">pstoeps</code><spanclass="sig-paren">(</span><em><spanclass="n">tmpfile</span></em>, <em><spanclass="n">bbox</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">rotated</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#pstoeps"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.pstoeps" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the postscript to encapsulated postscript. The bbox of
the eps file will be replaced with the given <em>bbox</em> argument. If
<codeclass="descclassname">matplotlib.backends.backend_ps.</code><codeclass="descname">quote_ps_string</code><spanclass="sig-paren">(</span><em><spanclass="n">s</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_ps.html#quote_ps_string"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_ps.quote_ps_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Quote dangerous characters of S for use in a PostScript string constant.</p>