1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
Package structure
=================
The :mod:`silx.gui.plot` package provides plot widgets.
This package is structured as follows.
.. currentmodule:: silx.gui.plot
:mod:`.PlotWidget` and :mod:`.PlotWindow` provides the user API.
:class:`PlotWidget` is a Qt widget (actually a :class:`QMainWindow`) displaying a 1D, 2D plot area.
It provides different interaction modes.
:class:`PlotWindow` is a Qt widget (actually a :class:`QMainWindow`) which adds a set of toolbar buttons and associated functionalities to :class:`PlotWidget`.
The toolbar QActions are implemented in :mod:`.actions`.
:mod:`.Plot`, :mod:`.PlotEvents` and :mod:`.PlotInteraction` implement the plotting API regardless of the rendering backend and regardless of its integration in Qt.
The plotting API in defined in :mod:`.Plot`.
The different interaction modes (zoom, drawing, pan) are implemented in :mod:`.PlotInteraction`.
Each interaction mode is implemented with a state machine structure (implemented in :mod:`.Interaction`).
The different events emitted by :class:`Plot` and by the interaction modes are created with helper functions defined in :mod:`.PlotEvents`.
The :class:`PlotWindow` uses additional widgets:
- :mod:`.CurvesROIWidget` to create regions of interest for curves
- :mod:`.LegendSelector` to display a list of curves legends which provides some control on the curves (e.g., select, delete).
- :mod:`.MaskToolsWidget` to provide tools to draw a mask on an image.
- :mod:`.ScatterMaskToolsWidget` to provide tools to draw a mask on a scatter.
- The :mod:`.PlotTools` module provides a set of additional widgets:
- :class:`.PlotTools.PositionInfo`
- :class:`.PlotTools.LimitsToolBar`
- The :mod:`.Profile` module provides toolbar for extracting profiles from image and image stack:
- :class:`.Profile.ProfileToolBar`
- :class:`.Profile.Profile3DToolBar`
- :mod:`silx.gui.console` to provide an IPython console which can control the plot area content.
The widgets also use the following miscellaneous modules:
- :mod:`._utils`: utility functions
The :mod:`backends` package provide the implementation of the rendering used by the :class:`Plot`.
It contains:
:mod:`.backends.BackendBase` defines the API any plot backend should provide in :class:`BackendBase`.
:mod:`.backends.BackendMatplotlib` implements a `matplotlib <http://matplotlib.org/>`_ backend.
The :mod:`.backends.BackendMatplotlib` the provides two classes:
.. currentmodule:: silx.gui.plot.backends.BackendMatplotlib
- :class:`BackendMatplotlib` that provides a matplotlib backend without a specific canvas.
- :class:`BackendMatplotlibQt` which inherits from :class:`BackendMatplotlib` and adds a Qt canvas, and Qt specific functionalities.
The OpenGL-based backend is implemented in the :mod:`.backends.BackendOpenGL` module and
the :mod:`.backends.glutils` package which provides the different primitives used for rendering and interaction.
It is based on :mod:`silx.gui._glutils`, `PyOpenGL <http://pyopengl.sourceforge.net/>`_ and OpenGL >= 2.1.
.. |Plot and backend| image:: img/plot_and_backend.png
:align: middle
|Plot and backend|
Modules
=======
.. currentmodule:: silx.gui.plot
For :mod:`.PlotWidget` and :mod:`.Plot` modules, see their respective documentations: :mod:`.PlotWidget`, :mod:`.Plot`.
The following modules are the modules used internally by the plot package.
:mod:`backends.BackendBase`
+++++++++++++++++++++++++++
.. currentmodule:: silx.gui.plot.backends.BackendBase
.. automodule:: silx.gui.plot.backends.BackendBase
:members:
:mod:`CurvesROIWidget`
++++++++++++++++++++++
.. currentmodule:: silx.gui.plot.CurvesROIWidget
.. automodule:: silx.gui.plot.CurvesROIWidget
:members:
:noindex:
:mod:`Interaction`
++++++++++++++++++
.. currentmodule:: silx.gui.plot.Interaction
.. automodule:: silx.gui.plot.Interaction
:members:
:mod:`LegendSelector`
+++++++++++++++++++++
.. currentmodule:: silx.gui.plot.LegendSelector
.. automodule:: silx.gui.plot.LegendSelector
:members:
:mod:`_BaseMaskToolsWidget`
+++++++++++++++++++++++++++
.. currentmodule:: silx.gui.plot._BaseMaskToolsWidget
.. automodule:: silx.gui.plot._BaseMaskToolsWidget
:members:
:mod:`MaskToolsWidget`
++++++++++++++++++++++
.. currentmodule:: silx.gui.plot.MaskToolsWidget
.. automodule:: silx.gui.plot.MaskToolsWidget
:members:
:show-inheritance:
:mod:`ScatterMaskToolsWidget`
+++++++++++++++++++++++++++++
.. currentmodule:: silx.gui.plot.ScatterMaskToolsWidget
.. automodule:: silx.gui.plot.ScatterMaskToolsWidget
:members:
:show-inheritance:
:mod:`PlotEvents`
+++++++++++++++++
.. currentmodule:: silx.gui.plot.PlotEvents
.. automodule:: silx.gui.plot.PlotEvents
:members:
:undoc-members:
:mod:`PlotInteraction`
++++++++++++++++++++++
.. currentmodule:: silx.gui.plot.PlotInteraction
.. automodule:: silx.gui.plot.PlotInteraction
:members:
:mod:`_utils`
+++++++++++++
.. currentmodule:: silx.gui.plot._utils
.. automodule:: silx.gui.plot._utils
:members:
:mod:`ticklayout`
-----------------
.. automodule:: silx.gui.plot._utils.ticklayout
:members:
|