spinetoolbox.widgets.plot_canvas

A Qt widget to use as a matplotlib backend.

Module Contents

Classes

LegendPosition

Generic enumeration.

PlotCanvas

A widget for plotting with matplotlib.

class spinetoolbox.widgets.plot_canvas.LegendPosition[source]

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

BOTTOM[source]
RIGHT[source]
class spinetoolbox.widgets.plot_canvas.PlotCanvas(parent=None, legend_axes_position=LegendPosition.BOTTOM)[source]

Bases: matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg

A widget for plotting with matplotlib.

Parameters
  • legend_axes_position (LegendPosition) – legend axes position relative to plot axes

  • parent (QWidget, optional) – a parent widget

property axes[source]

figure’s axes

Type

matplotlib.axes.Axes

property legend_axes[source]

figure’s legend axes

Type

matplotlib.axes.Axes

has_twinned_axes()[source]

Checks whether the axes have been twinned.

Returns

True if axes have been twinned, False otherwise

Return type

bool

twinned_axes()[source]

Returns twinned axes.

Returns

twinned axes

Return type

list of Axes