The class PlotCanvas

The class PlotCanvas is a canvas on which it is possible to visualize graphics with matplotlib.pyplot.

class plot_canvas.PlotCanvas

Inherits from the class matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg

Instance attribute

fig

The figure where the image is rendered

nplots

The number of subplots of the figure (1 or 2 depending on if the histogram is shown)

ax

One subplot or array of 2 subplots of the figure

Instance methods:

render_image(ima)

Renders the image (an instance to the class rimage.RImage) in one or two subplots depending on if the histogram is shown or not

clear()

Removes all subplots

refresh()

Redraws the current image in the current subplots