lib.qimage_svg.*

High resolution svg support for qimage and matplotlib.figure

Provides

class lib.qimage_svg.QImageSvg[source]

Bases: PyQt5.QtGui.QImage

Subclass of PyQt5.QtGui

Adds support for SVG byte strings and matplotlib figures

_matplotlib_figure2svg_bytes(figure)[source]

Converts a a matplotlib figure to an SVG bytes object

Parameters

figure (Figure) – Matplotib figure

Return type

bytes

Returns

SVG file content

from_matplotlib(figure)[source]

Paints an svg from a matplotlib figure

Parameters

figure (Figure) – Matplotib figure

from_svg_bytes(svg_bytes)[source]

Paints an svg from a bytes object

Parameters

svg_bytes (bytes) – SVG file content