GenericMplClient

class glue.viewers.common.viz_client.GenericMplClient(data=None, figure=None, axes=None, layer_artist_container=None, axes_factory=None)[source]

Bases: glue.core.client.Client

This client base class handles the logic of adding, removing, and updating layers.

Subsets are auto-added and removed with datasets. New subsets are auto-added iff the data has already been added

Attributes Summary

collect

Methods Summary

add_layer(layer) Add a new Data or Subset layer to the plot.
apply_roi(roi)
create_axes(figure)
new_layer_artist(layer)
register_to_hub(hub)
remove_layer(layer)
restore_layers(layers, context) Re-generate plot layers from a glue-serialized list
set_visible(layer, state) Toggle a layer’s visibility

Attributes Documentation

collect[source]

Methods Documentation

add_layer(layer)[source]

Add a new Data or Subset layer to the plot.

Returns the created layer artist

Parameters:layer (Data or Subset) – The layer to add
apply_roi(roi)[source]
create_axes(figure)[source]
new_layer_artist(layer)[source]
register_to_hub(hub)[source]
remove_layer(layer)[source]
restore_layers(layers, context)[source]

Re-generate plot layers from a glue-serialized list

set_visible(layer, state)[source]

Toggle a layer’s visibility

Parameters:
  • layer – which layer to modify
  • state – True or False