Interactive1DPlotter

class sitelle.plot.Interactive1DPlotter(axes, cube_axis, cube, *args, **kwargs)

An interactive 1D Plotter. A map is displayed, and clicking on a pixel displays the corresponding features contained inside.

axes

Axes – The matplotlib axes on which to plot. If None, a new one will be created.

axis

1D ndarray – The spectra axis

cube

3D ndarray – The datacube where the features are stored

args

Arguments to be passed to matplotlib.pyplot.plot() when plotting 1D data.

kwargs

dict – Keyword arguments to be passed to matplotlib.pyplot.plot() when plotting 1D data.

figure

Figure – The figure on which we listen for event (the 2D map)

Methods Summary

connect(figure) Connect the 1D plotter to a given figure (the 2D map), to listen for specific events (press and motion)
on_motion(event) Defines the behavior for a motion event.
on_press(event) Defines the behavior for a press event.

Methods Documentation

connect(figure)

Connect the 1D plotter to a given figure (the 2D map), to listen for specific events (press and motion)

Parameters:figure (Figure) – The figure containing the plot.
on_motion(event)

Defines the behavior for a motion event. Here, we display a rectangular patch around the pixel above which the mouse stands, as well as the value of the pixel in the 2D map.

on_press(event)

Defines the behavior for a press event. Here, we display the data contained in the z dimesion of the cube at the [x,y] position corresponding to the press.