MatplotlibDataViewer

class glue.viewers.matplotlib.qt.data_viewer.MatplotlibDataViewer(*args, **kwargs)[source]

Bases: glue.viewers.matplotlib.viewer.MatplotlibViewerMixin, glue.viewers.common.qt.data_viewer.DataViewer

Attributes Summary

subtools

tools

Methods Summary

addToolBar(self, Qt.ToolBarArea, QToolBar)

addToolBar(self, QToolBar) addToolBar(self, str) -> QToolBar

add_data(data)

add_layer(layer)

add_subset(subset)

apply_roi(roi[, override_mode])

This method must be implemented by subclasses

apply_subset_state(subset_state[, override_mode])

cleanup()

close(self)

closeEvent(event)

Call unregister on window close

dragEnterEvent(event)

Accept drag-and-drop of data or subset objects.

draw_legend(*args)

dropEvent(event)

Accept drag-and-drop of data or subset objects.

export_as_script(filename)

get_data_layer_artist([layer, layer_state])

get_handles_legend()

Collect the handles and labels from each layer artist.

get_layer_artist(cls[, layer, layer_state])

get_subset_layer_artist([layer, layer_state])

hide_toolbars()

Disable all the toolbars in the viewer.

initialize_toolbar()

isVisible(self)

layer_view()

limits_from_mpl(*args, **kwargs)

limits_to_mpl(*args)

mdi_wrap()

Wrap this object in a GlueMdiSubWindow

mousePressEvent(event)

Consume mouse press events, and prevent them from propagating down to the MDI area.

move([x, y])

Move the viewer to a new XY pixel location

notify(message)

options_widget()

redraw()

register_to_hub(hub)

remove_data(data)

remove_layer(layer)

remove_subset(subset)

request_add_layer(layer)

Issue a command to add a layer

set_focus(state)

set_status(message)

setup_callbacks()

show_toolbars()

Re-enable any toolbars that were hidden with hide_toolbars()

unregister(hub)

Default unregistration action.

update_legend(*args)

Update the legend colors and opacity.

update_viewer_state(context)

update_window_title()

update_x_axislabel(*event)

update_x_log(*args)

update_x_ticklabel(*event)

update_y_axislabel(*event)

update_y_log(*args)

update_y_ticklabel(*event)

warn(message, *args, **kwargs)

Attributes Documentation

subtools = {'save': ['mpl:save']}
tools = ['mpl:home', 'mpl:pan', 'mpl:zoom']

Methods Documentation

addToolBar(self, Qt.ToolBarArea, QToolBar)

addToolBar(self, QToolBar) addToolBar(self, str) -> QToolBar

add_data(data)
add_layer(layer)
add_subset(subset)
apply_roi(roi, override_mode=None)

This method must be implemented by subclasses

apply_subset_state(subset_state, override_mode=None)
cleanup()
close(self)bool
closeEvent(event)

Call unregister on window close

dragEnterEvent(event)

Accept drag-and-drop of data or subset objects.

draw_legend(*args)
dropEvent(event)

Accept drag-and-drop of data or subset objects.

export_as_script(filename)
get_data_layer_artist(layer=None, layer_state=None)
get_handles_legend()

Collect the handles and labels from each layer artist.

get_layer_artist(cls, layer=None, layer_state=None)
get_subset_layer_artist(layer=None, layer_state=None)
hide_toolbars()

Disable all the toolbars in the viewer.

This action can be reversed by calling show_toolbars()

initialize_toolbar()
isVisible(self)bool
layer_view()
limits_from_mpl(*args, **kwargs)
limits_to_mpl(*args)
mdi_wrap()

Wrap this object in a GlueMdiSubWindow

mousePressEvent(event)

Consume mouse press events, and prevent them from propagating down to the MDI area.

move(x=None, y=None)

Move the viewer to a new XY pixel location

You can also set the position attribute to a new tuple directly.

Parameters
xint (optional)

New x position

yint (optional)

New y position

notify(message)
options_widget()
redraw()
register_to_hub(hub)
remove_data(data)
remove_layer(layer)
remove_subset(subset)
request_add_layer(layer)

Issue a command to add a layer

set_focus(state)
set_status(message)
setup_callbacks()
show_toolbars()

Re-enable any toolbars that were hidden with hide_toolbars()

Does not re-enable toolbars that were hidden by other means

unregister(hub)

Default unregistration action. Calls hub.unsubscribe_all on self

update_legend(*args)

Update the legend colors and opacity.

update_viewer_state(context)
update_window_title()
update_x_axislabel(*event)
update_x_log(*args)
update_x_ticklabel(*event)
update_y_axislabel(*event)
update_y_log(*args)
update_y_ticklabel(*event)
warn(message, *args, **kwargs)