<divid="unreleased-message"> You are reading an old version of the documentation (v3.0.3). For the latest version see <ahref="https://matplotlib.org/stable/api/backend_svg_api.html">https://matplotlib.org/stable/api/backend_svg_api.html</a></div>
<codeclass="descclassname">matplotlib.backends.backend_svg.</code><codeclass="descname">FigureCanvas</code><aclass="headerlink" href="#matplotlib.backends.backend_svg.FigureCanvas" title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">matplotlib.backends.backend_svg.</code><codeclass="descname">FigureCanvasSVG</code><spanclass="sig-paren">(</span><em>figure</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#FigureCanvasSVG"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.FigureCanvasSVG" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">fixed_dpi</code><emclass="property"> = 72</em><aclass="headerlink" href="#matplotlib.backends.backend_svg.FigureCanvasSVG.fixed_dpi" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_default_filetype</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#FigureCanvasSVG.get_default_filetype"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.FigureCanvasSVG.get_default_filetype" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the default savefig file format as specified in rcParam
<codeclass="docutils literal notranslate"><spanclass="pre">savefig.format</span></code>. Returned string excludes period. Overridden
in backends that only support a single file type.</p>
<codeclass="descname">print_svg</code><spanclass="sig-paren">(</span><em>filename</em>, <em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#FigureCanvasSVG.print_svg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.FigureCanvasSVG.print_svg" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">print_svgz</code><spanclass="sig-paren">(</span><em>filename</em>, <em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#FigureCanvasSVG.print_svgz"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.FigureCanvasSVG.print_svgz" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">close_group</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.close_group"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.close_group" title="Permalink to this definition">¶</a></dt>
<dd><p>Close a grouping element with label <em>s</em>
Is only currently used by <aclass="reference internal" href="#module-matplotlib.backends.backend_svg" title="matplotlib.backends.backend_svg"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">backend_svg</span></code></a></p>
transformation <em>may</em> be passed to <aclass="reference internal" href="#matplotlib.backends.backend_svg.RendererSVG.draw_image" title="matplotlib.backends.backend_svg.RendererSVG.draw_image"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw_image()</span></code></a>. It takes the
form of a <aclass="reference internal" href="transformations.html#matplotlib.transforms.Affine2DBase" title="matplotlib.transforms.Affine2DBase"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Affine2DBase</span></code></a> instance.
The translation vector of the transformation is given in physical
units (i.e., dots or pixels). Note that the transformation does not
override <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">x</span></code> and <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">y</span></code>, and has to be applied <em>before</em> translating
the result by <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">x</span></code> and <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">y</span></code> (this can be accomplished by adding <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">x</span></code>
and <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">y</span></code> to the translation vector defined by <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">transform</span></code>).</p>
<codeclass="descname">draw_markers</code><spanclass="sig-paren">(</span><em>gc</em>, <em>marker_path</em>, <em>marker_trans</em>, <em>path</em>, <em>trans</em>, <em>rgbFace=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.draw_markers"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.draw_markers" title="Permalink to this definition">¶</a></dt>
<dd><p>Draws a marker at each of the vertices in path. 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_svg.RendererSVG.draw_path" title="matplotlib.backends.backend_svg.RendererSVG.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>gc</em>, <em>path</em>, <em>transform</em>, <em>rgbFace=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.draw_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.draw_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Draws a <aclass="reference internal" href="path_api.html#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Path</span></code></a> instance using the
<codeclass="descname">draw_path_collection</code><spanclass="sig-paren">(</span><em>gc</em>, <em>master_transform</em>, <em>paths</em>, <em>all_transforms</em>, <em>offsets</em>, <em>offsetTrans</em>, <em>facecolors</em>, <em>edgecolors</em>, <em>linewidths</em>, <em>linestyles</em>, <em>antialiaseds</em>, <em>urls</em>, <em>offset_position</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.draw_path_collection"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.draw_path_collection" title="Permalink to this definition">¶</a></dt>
<dd><p>Draws 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. <em>offset_position</em> may be either "screen" or "data"
depending on the space that the offsets are in.</p>
<p>This provides a fallback implementation of
<aclass="reference internal" href="#matplotlib.backends.backend_svg.RendererSVG.draw_path_collection" title="matplotlib.backends.backend_svg.RendererSVG.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_svg.RendererSVG.draw_path" title="matplotlib.backends.backend_svg.RendererSVG.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_svg.RendererSVG.draw_path_collection" title="matplotlib.backends.backend_svg.RendererSVG.draw_path_collection"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw_path_collection()</span></code></a> can be made globally.</p>
<codeclass="descname">finalize</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.finalize"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.finalize" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">flipy</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.flipy"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.flipy" title="Permalink to this definition">¶</a></dt>
<dd><p>Return true if y small numbers are top for renderer Is used
for drawing text (<aclass="reference internal" href="text_api.html#module-matplotlib.text" title="matplotlib.text"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">matplotlib.text</span></code></a>) and images
<codeclass="descname">get_canvas_width_height</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.get_canvas_width_height"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.get_canvas_width_height" title="Permalink to this definition">¶</a></dt>
<dd><p>return the canvas width and height in display coords</p>
<codeclass="descname">get_image_magnification</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.get_image_magnification"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.get_image_magnification" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the factor by which to magnify images passed to <aclass="reference internal" href="#matplotlib.backends.backend_svg.RendererSVG.draw_image" title="matplotlib.backends.backend_svg.RendererSVG.draw_image"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw_image()</span></code></a>.
Allows a backend to have images at a different resolution to other
<codeclass="descname">get_text_width_height_descent</code><spanclass="sig-paren">(</span><em>s</em>, <em>prop</em>, <em>ismath</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.get_text_width_height_descent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.get_text_width_height_descent" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the width, height, and descent (offset from the bottom
to the baseline), in display coords, of the string <em>s</em> with
<codeclass="descname">open_group</code><spanclass="sig-paren">(</span><em>s</em>, <em>gid=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.open_group"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.open_group" title="Permalink to this definition">¶</a></dt>
<dd><p>Open a grouping element with label <em>s</em>. If <em>gid</em> is given, use
<codeclass="descname">option_image_nocomposite</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.option_image_nocomposite"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.option_image_nocomposite" title="Permalink to this definition">¶</a></dt>
<dd><p>return whether to generate a composite image from multiple images on
<codeclass="descname">option_scale_image</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#RendererSVG.option_scale_image"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.RendererSVG.option_scale_image" title="Permalink to this definition">¶</a></dt>
<dd><p>override this method for renderers that support arbitrary affine
<emclass="property">class </em><codeclass="descclassname">matplotlib.backends.backend_svg.</code><codeclass="descname">XMLWriter</code><spanclass="sig-paren">(</span><em>file</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#XMLWriter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.XMLWriter" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">close</code><spanclass="sig-paren">(</span><em>id</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#XMLWriter.close"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.XMLWriter.close" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">comment</code><spanclass="sig-paren">(</span><em>comment</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#XMLWriter.comment"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.XMLWriter.comment" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">data</code><spanclass="sig-paren">(</span><em>text</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#XMLWriter.data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.XMLWriter.data" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">end</code><spanclass="sig-paren">(</span><em>tag=None</em>, <em>indent=True</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#XMLWriter.end"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.XMLWriter.end" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">flush</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#XMLWriter.flush"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.XMLWriter.flush" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">start</code><spanclass="sig-paren">(</span><em>tag</em>, <em>attrib={}</em>, <em>**extra</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#XMLWriter.start"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.XMLWriter.start" title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">matplotlib.backends.backend_svg.</code><codeclass="descname">escape_attrib</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#escape_attrib"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.escape_attrib" title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">matplotlib.backends.backend_svg.</code><codeclass="descname">escape_cdata</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#escape_cdata"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.escape_cdata" title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">matplotlib.backends.backend_svg.</code><codeclass="descname">escape_comment</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#escape_comment"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.escape_comment" title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">matplotlib.backends.backend_svg.</code><codeclass="descname">generate_css</code><spanclass="sig-paren">(</span><em>attrib={}</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#generate_css"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.generate_css" title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">matplotlib.backends.backend_svg.</code><codeclass="descname">generate_transform</code><spanclass="sig-paren">(</span><em>transform_list=[]</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#generate_transform"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.generate_transform" title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">matplotlib.backends.backend_svg.</code><codeclass="descname">short_float_fmt</code><spanclass="sig-paren">(</span><em>x</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backends/backend_svg.html#short_float_fmt"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backends.backend_svg.short_float_fmt" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a short string representation of a float, which is %f
formatting with trailing zeros and the decimal point removed.</p>