class openalea.oalab.plot2d.mplwidget.AbstractMplWidget[source]

Bases: PySide.QtGui.QWidget

Abstract class for widget using matplotlib

It implement the get_singleton method that return the class _singleton attribute (instanciating it if necessary). Such a subclass can:

  • Have its own _singleton attribute, set to None by default
  • Override the class method create_singleton that takes no argument which return the singleton instance. Otherwise the default method calls the class constructor with no argument

It also duck type the QMainWindow interface used by matplotlib

classmethod create_singleton()[source]
classmethod get_singleton()[source]
get_window()[source]

return (grand)parent window, creating it if necessary

show()[source]

duck typing of QMainWindow.show

statusBar()[source]

duck typing of QMainWindow.statusBar

staticMetaObject = <PySide.QtCore.QMetaObject object at 0x2aded6083c68>
class openalea.oalab.plot2d.mplwidget.CanvasWidget(parent=None)[source]

Bases: PySide.QtGui.QWidget

Widget that contains a mpl canvas

addToolBar(toolbar)[source]
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x2aded6083200>
class openalea.oalab.plot2d.mplwidget.FigureManagerQTwithTab(num)[source]

Bases: matplotlib.backends.backend_qt4.FigureManagerQT

qt4agg.FigureManageQT subclass that put mpl figures in a MplTabWidget

destroy(*args)[source]

override to close only the suitable tab, not the whole MplTabWidget

class openalea.oalab.plot2d.mplwidget.MplTabWidget(parent=None)[source]

Bases: PySide.QtGui.QTabWidget, openalea.oalab.plot2d.mplwidget.AbstractMplWidget

Singleton class that implement mpl figure in a tab widget

add_tab_canvas(fig_num=None, close_function=None)[source]

add a tab canvas with mpl figure in it

clf()[source]
close_figure()[source]
dragEnterEvent(event)[source]
dropEvent(event)[source]
get_plugin_actions()[source]

return actions list for OAlab

initialize()[source]
new_figure()[source]
remove_canvas_tab(tab_index)[source]
remove_canvas_widget(widget)[source]

remove the tab containing given widget

tabCloseEvent(tab_index)[source]
toolbar_actions()[source]
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x2aded6083170>
openalea.oalab.plot2d.mplwidget.new_figure_manager_given_figure(num, figure)[source]

Create a new figure manager instance for the given figure. This function is made to replace its homonyme in mpl.backends.backend_qt4agg

Previous topic

<no title>

Next topic

openalea.oalab.plugin package

This Page