You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2.post1758+gbc39b1c4a
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.


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.