gdesk.matplotbe package¶
Module contents¶
Render to qt from agg.
- gdesk.matplotbe.FigureCanvas¶
alias of
gdesk.matplotbe.FigureCanvasGh2
- class gdesk.matplotbe.FigureCanvasGh2(figure)¶
Bases:
matplotlib.backends.backend_agg.FigureCanvasAgg
,matplotlib.backends.backend_qt5.FigureCanvasQT
- blit(bbox=None)¶
Blit the canvas in bbox (default entire canvas).
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True) → None¶
- draw_idle()¶
Request a widget redraw once control returns to the GUI event loop.
Even if multiple calls to draw_idle occur before control returns to the GUI event loop, the figure will only be rendered once.
Backends may choose to override the method and implement their own strategy to prevent multiple renderings.
- paintEvent(event)¶
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)¶
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.
- filenamestr or path-like or file-like
The file where the figure is saved.
- dpifloat, default: :rc:`savefig.dpi`
The dots per inch to save the figure in.
- facecolorcolor or ‘auto’, default: :rc:`savefig.facecolor`
The facecolor of the figure. If ‘auto’, use the current figure facecolor.
- edgecolorcolor or ‘auto’, default: :rc:`savefig.edgecolor`
The edgecolor of the figure. If ‘auto’, use the current figure edgecolor.
- orientation{‘landscape’, ‘portrait’}, default: ‘portrait’
Only currently applies to PostScript printing.
- formatstr, optional
Force a specific file format. If not given, the format is inferred from the filename extension, and if that fails from :rc:`savefig.format`.
- bbox_inches‘tight’ or .Bbox, default: :rc:`savefig.bbox`
Bounding box in inches: only the given portion of the figure is saved. If ‘tight’, try to figure out the tight bbox of the figure.
- pad_inchesfloat, default: :rc:`savefig.pad_inches`
Amount of padding around the figure when bbox_inches is ‘tight’.
- bbox_extra_artistslist of ~matplotlib.artist.Artist, optional
A list of extra artists that will be considered when the tight bbox is calculated.
- backendstr, optional
Use a non-default backend to render the file, e.g. to render a png file with the “cairo” backend rather than the default “agg”, or a pdf file with the “pgf” backend rather than the default “pdf”. Note that the default backend is normally sufficient. See the-builtin-backends for a list of valid backends for each file format. Custom backends can be referenced as “module://…”.
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶
- gdesk.matplotbe.FigureManager¶
alias of
gdesk.matplotbe.FigureManagerGh2
- class gdesk.matplotbe.FigureManagerGh2(canvas, num)¶
Bases:
matplotlib.backend_bases.FigureManagerBase
Wrap everything up into a window for the pylab interface
For non interactive backends, the base class does all the work
- destroy(*args)¶
- show()¶
For GUI backends, show the figure window and redraw. For non-GUI backends, raise an exception to be caught by
show()
, for an optional warning.
- class gdesk.matplotbe.FigureManagerGh2Child(canvas, num)¶
Bases:
matplotlib.backend_bases.FigureManagerBase
Wrap everything up into a window for the pylab interface
For non interactive backends, the base class does all the work
- show()¶
For GUI backends, show the figure window and redraw. For non-GUI backends, raise an exception to be caught by
show()
, for an optional warning.
- gdesk.matplotbe.draw_if_interactive()¶
For image backends - is not required. For GUI backends - this should be overridden if drawing should be done in interactive python mode.
- gdesk.matplotbe.new_figure_manager(num, *args, FigureClass=<class 'matplotlib.figure.Figure'>, **kwargs)¶
Create a new figure manager instance.
- gdesk.matplotbe.new_figure_manager_given_figure(num, figure)¶
Create a new figure manager instance for the given figure.
- gdesk.matplotbe.show(*, block=None)¶
For image backends - is not required. For GUI backends - show() is usually the last line of a pyplot script and tells the backend that it is time to draw. In interactive mode, this should do nothing.