Page Contents

This Page

MPLCanvas

class enaml.widgets.mpl_canvas.MPLCanvas(parent=None, **kwargs)[source]

Bases: enaml.widgets.control.Control

A control which can be used to embded a matplotlib figure.

figure = None

The matplotlib figure to display in the widget.

toolbar_visible = None

Whether or not the matplotlib figure toolbar is visible.

hug_width = None

Matplotlib figures expand freely in height and width by default.

snapshot()[source]

Get the snapshot dict for the MPLCanvas.

bind()[source]

Bind the change handlers for the MPLCanvas.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_mpl_canvas.QtMPLCanvas

class enaml.qt.qt_mpl_canvas.QtMPLCanvas(object_id, parent, session)[source]

Bases: enaml.qt.qt_control.QtControl

A Qt implementation of an Enaml MPLCanvas.

create_widget(parent, tree)[source]

Create the underlying widget.

create(tree)[source]

Create and initialize the underlying widget.

init_layout()[source]

Initialize the layout of the underlying widget.

on_action_set_figure(content)[source]

Handle the ‘set_figure’ action from the Enaml widget.

on_action_set_toolbar_visible(content)[source]

Handle the ‘set_toolbar_visible’ action from the Enaml widget.

refresh_mpl_widget()[source]

Create the mpl widget and update the underlying control.

Wx

Inheritance diagram of enaml.wx.wx_mpl_canvas.WxMPLCanvas

class enaml.wx.wx_mpl_canvas.WxMPLCanvas(object_id, parent, session)[source]

Bases: enaml.wx.wx_control.WxControl

A Wx implementation of an Enaml MPLCanvas.

create_widget(parent, tree)[source]

Create the underlying widget.

create(tree)[source]

Create and initialize the underlying widget.

init_layout()[source]

Initialize the layout of the underlying widget.

on_action_set_figure(content)[source]

Handle the ‘set_figure’ action from the Enaml widget.

on_action_set_toolbar_visible(content)[source]

Handle the ‘set_toolbar_visible’ action from the Enaml widget.

refresh_mpl_widget(notify=True)[source]

Create the mpl widget and update the underlying control.

Parameters:notify (bool, optional) – Whether to notify the layout system if the size hint of the widget has changed. The default is True.