Package structure¶
The silx.gui.plot
package provides plot widgets.
This package is structured as follows.
PlotWidget
and PlotWindow
provides the user API.
PlotWidget
is a Qt widget (actually a QMainWindow
) displaying a 1D, 2D plot area.
It provides different interaction modes.
PlotWindow
is a Qt widget (actually a QMainWindow
) which adds a set of toolbar buttons and associated functionalities to PlotWidget
.
The toolbar QActions are implemented in actions
.
Plot
, PlotEvents
and PlotInteraction
implement the plotting API regardless of the rendering backend and regardless of its integration in Qt.
The plotting API in defined in Plot
.
The different interaction modes (zoom, drawing, pan) are implemented in PlotInteraction
.
Each interaction mode is implemented with a state machine structure (implemented in Interaction
).
The different events emitted by Plot
and by the interaction modes are created with helper functions defined in PlotEvents
.
The PlotWindow
uses additional widgets:
CurvesROIWidget
to create regions of interest for curvesLegendSelector
to display a list of curves legends which provides some control on the curves (e.g., select, delete).MaskToolsWidget
to provide tools to draw a mask on an image.ScatterMaskToolsWidget
to provide tools to draw a mask on a scatter.- The
PlotTools
module provides a set of additional widgets:PlotTools.PositionInfo
PlotTools.LimitsToolBar
- The
Profile
module provides toolbar for extracting profiles from image and image stack:Profile.ProfileToolBar
Profile.Profile3DToolBar
silx.gui.console
to provide an IPython console which can control the plot area content.
The widgets also use the following miscellaneous modules:
_utils
: utility functions
The backends
package provide the implementation of the rendering used by the Plot
.
It contains:
backends.BackendBase
defines the API any plot backend should provide in BackendBase
.
backends.BackendMatplotlib
implements a matplotlib backend.
The backends.BackendMatplotlib
the provides two classes:
BackendMatplotlib
that provides a matplotlib backend without a specific canvas.BackendMatplotlibQt
which inherits fromBackendMatplotlib
and adds a Qt canvas, and Qt specific functionalities.
The OpenGL-based backend is implemented in the backends.BackendOpenGL
module and
the backends.glutils
package which provides the different primitives used for rendering and interaction.
It is based on silx.gui._glutils
, PyOpenGL and OpenGL >= 2.1.
Modules¶
For PlotWidget
and Plot
modules, see their respective documentations: PlotWidget
, Plot
.
The following modules are the modules used internally by the plot package.