You are reading an old version of the documentation (v2.2.2). For the latest version see
Version 2.2.2
Fork me on GitHub


Render to qt from agg


alias of matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg

class matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg(figure)[source]

Bases: matplotlib.backends.backend_agg.FigureCanvasAgg, matplotlib.backends.backend_qt5.FigureCanvasQT


Blit the region in bbox.


Deprecated since version 2.1: The blitbox function was deprecated in version 2.1.


Copy the image from the Agg canvas to the qt.drawable.

In Qt, all drawing should be done inside of here when a widget is shown onscreen.

print_figure(*args, **kwargs)[source]

Render the figure to hardcopy. Set the figure patch face and edge colors. This is useful because some of the GUIs have a gray figure face color background and you’ll probably want to override this on hardcopy.


can also be a file object on image backends

orientation : {‘landscape’, ‘portrait’}, optional

only currently applies to PostScript printing.

dpi : scalar, optional

the dots per inch to save the figure in; if None, use savefig.dpi

facecolor : color spec or None, optional

the facecolor of the figure; if None, defaults to savefig.facecolor

edgecolor : color spec or None, optional

the edgecolor of the figure; if None, defaults to savefig.edgecolor

format : str, optional

when set, forcibly set the file format to save to

bbox_inches : str or Bbox, optional

Bbox in inches. Only the given portion of the figure is saved. If ‘tight’, try to figure out the tight bbox of the figure. If None, use savefig.bbox

pad_inches : scalar, optional

Amount of padding around the figure when bbox_inches is ‘tight’. If None, use savefig.pad_inches

bbox_extra_artists : list of Artist, optional

A list of extra artists that will be considered when the tight bbox is calculated.

class matplotlib.backends.backend_qt5agg.FigureCanvasQTAggBase(**kwargs)[source]

Bases: matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg

Deprecated since version 2.2: The FigureCanvasQTAggBase class was deprecated in version 2.2.