spinetoolbox.widgets.plot_widget

A Qt widget showing a toolbar and a matplotlib plotting canvas.

author
  1. Soininen (VTT)

date

27.6.2019

Module Contents

Classes

PlotWidget

A widget that contains a toolbar and a plotting canvas.

Functions

_prepare_plot_in_window_menu(menu)

Fills a given menu with available plot window names.

class spinetoolbox.widgets.plot_widget.PlotWidget(parent=None)[source]

Bases: PySide2.QtWidgets.QWidget

A widget that contains a toolbar and a plotting canvas.

canvas

the plotting canvas

Type

PlotCanvas

plot_type

type of currently plotted data or None

Type

type

plot_windows[source]

A global list of plot windows.

closeEvent(self, event)[source]

Removes the window from plot_windows and closes.

infer_plot_type(self, values)[source]

Decides suitable plot_type according to a list of values.

use_as_window(self, parent_window, document_name)[source]

Prepares the widget to be used as a window and adds it to plot_windows list.

Parameters
  • parent_window (QWidget) – a parent window

  • document_name (str) – a string to add to the window title

static _unique_window_name(document_name)[source]

Returns an unique identifier for a new plot window.

spinetoolbox.widgets.plot_widget._prepare_plot_in_window_menu(menu)[source]

Fills a given menu with available plot window names.