diff options
Diffstat (limited to 'doc/source/modules/gui/plot')
19 files changed, 228 insertions, 38 deletions
diff --git a/doc/source/modules/gui/plot/dev.rst b/doc/source/modules/gui/plot/dev.rst index 8966487..0c848e9 100644 --- a/doc/source/modules/gui/plot/dev.rst +++ b/doc/source/modules/gui/plot/dev.rst @@ -92,6 +92,7 @@ The following modules are the modules used internally by the plot package. .. automodule:: silx.gui.plot.CurvesROIWidget :members: + :noindex: :mod:`Interaction` ++++++++++++++++++ diff --git a/doc/source/modules/gui/plot/getting_started.rst b/doc/source/modules/gui/plot/getting_started.rst index 899d262..ead9e43 100644 --- a/doc/source/modules/gui/plot/getting_started.rst +++ b/doc/source/modules/gui/plot/getting_started.rst @@ -20,8 +20,6 @@ For a complete description of the API, see :mod:`silx.gui.plot`. Use :mod:`silx.gui.plot` from (I)Python console ----------------------------------------------- -We recommend to use (I)Python 3.x and PyQt5. - From a Python or IPython interpreter, the simplest way is to import the :mod:`silx.sx` module: >>> from silx import sx @@ -48,10 +46,6 @@ the way silx loads Qt and the way IPython is doing it through the ``--gui`` opti `%pylab <http://ipython.org/ipython-doc/stable/interactive/magics.html#magic-pylab>`_ magics. In this case, IPython magics that initialize Qt might not work after importing modules from silx.gui. -When using Python2.7 and PyQt4, there is another incompatibility to deal with as -silx requires PyQt4 API version 2 (See note below for explanation). -In this case, start IPython with the ``QT_API`` environment variable set to ``pyqt``. - On Linux and MacOS X, run from the command line:: QT_API=pyqt ipython @@ -61,16 +55,6 @@ On Windows, run from the command line:: set QT_API=pyqt&&ipython -.. note:: PyQt4 used from Python 2.x provides 2 incompatible versions of QString and QVariant: - - - version 1, the legacy version which is also the default, and - - version 2, a more pythonic one, which is the only one supported by *silx*. - - All other configurations (i.e., PyQt4 on Python 3.x, PySide2, PyQt5, IPython QtConsole widget) uses version 2. - - For more information, see `IPython, PyQt and PySide <http://ipython.org/ipython-doc/stable/interactive/reference.html#pyqt-and-pyside>`_. - - Plot functions ++++++++++++++ @@ -101,9 +85,9 @@ A Qt GUI script must have a QApplication initialised before creating widgets: if __name__ == '__main__': [...] - qapp.exec_() + qapp.exec() -Unless a Qt binding has already been loaded, :mod:`silx.gui.qt` uses one of the supported Qt bindings (PyQt5, PyQt4, PySide2). +Unless a Qt binding has already been loaded, :mod:`silx.gui.qt` uses one of the supported Qt bindings (PyQt5, PySide6, PyQt6). If you prefer to choose the Qt binding yourself, import it before importing a module from :mod:`silx.gui`: diff --git a/doc/source/modules/gui/plot/img/BasicGridStatsWidget.png b/doc/source/modules/gui/plot/img/BasicGridStatsWidget.png Binary files differnew file mode 100644 index 0000000..a468cc1 --- /dev/null +++ b/doc/source/modules/gui/plot/img/BasicGridStatsWidget.png diff --git a/doc/source/modules/gui/plot/img/BasicStatsWidget.png b/doc/source/modules/gui/plot/img/BasicStatsWidget.png Binary files differnew file mode 100644 index 0000000..6dbdd30 --- /dev/null +++ b/doc/source/modules/gui/plot/img/BasicStatsWidget.png diff --git a/doc/source/modules/gui/plot/img/LimitsToolBar.png b/doc/source/modules/gui/plot/img/LimitsToolBar.png Binary files differindex 99af8bd..2d96458 100644 --- a/doc/source/modules/gui/plot/img/LimitsToolBar.png +++ b/doc/source/modules/gui/plot/img/LimitsToolBar.png diff --git a/doc/source/modules/gui/plot/img/ROIStatsWidget.png b/doc/source/modules/gui/plot/img/ROIStatsWidget.png Binary files differnew file mode 100644 index 0000000..fae9d62 --- /dev/null +++ b/doc/source/modules/gui/plot/img/ROIStatsWidget.png diff --git a/doc/source/modules/gui/plot/img/logColorbar.png b/doc/source/modules/gui/plot/img/logColorbar.png Binary files differindex cdd247c..31594e0 100644 --- a/doc/source/modules/gui/plot/img/logColorbar.png +++ b/doc/source/modules/gui/plot/img/logColorbar.png diff --git a/doc/source/modules/gui/plot/index.rst b/doc/source/modules/gui/plot/index.rst index 6f06830..7f60ba4 100644 --- a/doc/source/modules/gui/plot/index.rst +++ b/doc/source/modules/gui/plot/index.rst @@ -54,13 +54,21 @@ Additionnal plot tool widgets: actions/index.rst plottoolbuttons.rst - tools.rst + tools/index.rst profile.rst roi.rst printpreviewtoolbutton.rst statswidget.rst + roistatswidget.rst stats/index.rst +Utilities + +.. toctree:: + :maxdepth: 2 + + utils.rst + Internals --------- diff --git a/doc/source/modules/gui/plot/items.rst b/doc/source/modules/gui/plot/items.rst index 43eb77e..2b2985b 100644 --- a/doc/source/modules/gui/plot/items.rst +++ b/doc/source/modules/gui/plot/items.rst @@ -118,3 +118,34 @@ Axis .. automodule:: silx.gui.plot.items.roi :members: + :show-inheritance: + + .. autoclass:: silx.gui.plot.items.roi.ArcROI + :members: + :show-inheritance: + + .. autoclass:: silx.gui.plot.items.roi.BandROI + :members: + :show-inheritance: + + +Base class for regions of interest +++++++++++++++++++++++++++++++++++ + +.. autoclass:: silx.gui.plot.items._roi_base._RegionOfInterestBase + :members: + :show-inheritance: + +.. autoclass:: silx.gui.plot.items.roi.RegionOfInterest + :members: + :show-inheritance: + +.. autoclass:: silx.gui.plot.items.roi.HandleBasedROI + :members: + :show-inheritance: + +.. autoclass:: silx.gui.plot.items.roi.InteractionModeMixIn + :members: + +.. autoclass:: silx.gui.plot.items.roi.RoiInteractionMode + :members: diff --git a/doc/source/modules/gui/plot/plotsignal.rst b/doc/source/modules/gui/plot/plotsignal.rst index 091f481..641b0ef 100644 --- a/doc/source/modules/gui/plot/plotsignal.rst +++ b/doc/source/modules/gui/plot/plotsignal.rst @@ -91,6 +91,7 @@ Both share the following keys: - 'event': 'curveClicked' or 'imageClicked' - 'button': the mouse button that was pressed in 'left', 'middle', 'right' +- 'item': The plot item object that was clicked - 'label': The legend associated with the clicked image or curve - 'type': The type of item in 'curve', 'image' - 'x' and 'y': The clicked position in data coordinates diff --git a/doc/source/modules/gui/plot/plotwidget.rst b/doc/source/modules/gui/plot/plotwidget.rst index 9978479..05dd77c 100644 --- a/doc/source/modules/gui/plot/plotwidget.rst +++ b/doc/source/modules/gui/plot/plotwidget.rst @@ -82,7 +82,10 @@ The following methods handle plot limits, aspect ratio, grid and axes display: .. automethod:: PlotWidget.setKeepDataAspectRatio .. automethod:: PlotWidget.getGraphGrid .. automethod:: PlotWidget.setGraphGrid +.. automethod:: PlotWidget.isAxesDisplayed .. automethod:: PlotWidget.setAxesDisplayed +.. automethod:: PlotWidget.getAxesMargins +.. automethod:: PlotWidget.setAxesMargins Reset zoom .......... @@ -112,6 +115,7 @@ Interaction Those methods allow to change the interaction mode (e.g., drawing mode) of the plot and to toggle the use of a crosshair cursor: +.. automethod:: PlotWidget.interaction .. automethod:: PlotWidget.getInteractiveMode .. automethod:: PlotWidget.setInteractiveMode diff --git a/doc/source/modules/gui/plot/roi.rst b/doc/source/modules/gui/plot/roi.rst index 77b5c2a..efe41a7 100644 --- a/doc/source/modules/gui/plot/roi.rst +++ b/doc/source/modules/gui/plot/roi.rst @@ -1,12 +1,15 @@ -.. currentmodule:: silx.gui.plot +.. currentmodule:: silx.gui.plot.CurvesROIWidget :mod:`CurvesROIWidget`: ROI from curves ======================================= + .. |roiWidgetImage| image:: img/roiwidget.png :height: 400px :align: middle +.. automodule:: silx.gui.plot.CurvesROIWidget + You can access to the ROIWidget from a Plot window by : - using the tool button 'ROI' @@ -14,4 +17,28 @@ You can access to the ROIWidget from a Plot window by : |roiWidgetImage| -.. automodule:: silx.gui.plot.CurvesROIWidget + + + +:class:`ROI` class +------------------ + +.. autoclass:: ROI + :show-inheritance: + :members: + + +:class:`CurvesROIWidget` class +------------------------------- + +.. autoclass:: CurvesROIWidget + :show-inheritance: + :members: + + +:class:`ROITable` class +----------------------- + +.. autoclass:: ROITable + :show-inheritance: + :members: diff --git a/doc/source/modules/gui/plot/roistatswidget.rst b/doc/source/modules/gui/plot/roistatswidget.rst new file mode 100644 index 0000000..d9563b5 --- /dev/null +++ b/doc/source/modules/gui/plot/roistatswidget.rst @@ -0,0 +1,24 @@ + +.. currentmodule:: silx.gui.plot.ROIStatsWidget + +:mod:`ROIStatsWidget`: Display a set of statistics for couples (plot items, roi) +================================================================================ + +An example of the usage is given in examples/plotRoiStats.py + +.. automodule:: silx.gui.plot.ROIStatsWidget + + +:class:`ROIStatsWidget` class +----------------------------- + +.. autoclass:: ROIStatsWidget + :show-inheritance: + :members: + +:class:`ROIStatsItemHelper` class +--------------------------------- + +.. autoclass:: ROIStatsItemHelper + :show-inheritance: + :members: diff --git a/doc/source/modules/gui/plot/statswidget.rst b/doc/source/modules/gui/plot/statswidget.rst index f534921..1574abc 100644 --- a/doc/source/modules/gui/plot/statswidget.rst +++ b/doc/source/modules/gui/plot/statswidget.rst @@ -31,3 +31,19 @@ :show-inheritance: :members: + +:class:`BasicLineStatsWidget` class +----------------------------------- + +.. autoclass:: BasicLineStatsWidget + :show-inheritance: + :members: + + +:class:`BasicGridStatsWidget` class +----------------------------------- + +.. autoclass:: BasicGridStatsWidget + :show-inheritance: + :members: + diff --git a/doc/source/modules/gui/plot/img/CurveLegendsWidget.png b/doc/source/modules/gui/plot/tools/img/CurveLegendsWidget.png Binary files differindex e7fa9f8..e7fa9f8 100644 --- a/doc/source/modules/gui/plot/img/CurveLegendsWidget.png +++ b/doc/source/modules/gui/plot/tools/img/CurveLegendsWidget.png diff --git a/doc/source/modules/gui/plot/img/linearColorbar.png b/doc/source/modules/gui/plot/tools/img/linearColorbar.png Binary files differindex 26621ce..26621ce 100644 --- a/doc/source/modules/gui/plot/img/linearColorbar.png +++ b/doc/source/modules/gui/plot/tools/img/linearColorbar.png diff --git a/doc/source/modules/gui/plot/tools.rst b/doc/source/modules/gui/plot/tools/index.rst index d7c96b5..c75aea5 100644 --- a/doc/source/modules/gui/plot/tools.rst +++ b/doc/source/modules/gui/plot/tools/index.rst @@ -1,10 +1,23 @@ +.. currentmodule:: silx.gui.plot.tools + :mod:`~silx.gui.plot.tools`: Tool widgets for PlotWidget ======================================================== -.. currentmodule:: silx.gui.plot.tools - .. automodule:: silx.gui.plot.tools +Tools API +--------- + +Tools are divided into the following sub-modules: + +.. toctree:: + :maxdepth: 1 + + profile.rst + +Other tools API +--------------- + :class:`PositionInfo` class --------------------------- @@ -91,21 +104,6 @@ .. autoclass:: RegionOfInterestTableWidget :members: -:mod:`~silx.gui.plot.tools.profile`: Profile Tools --------------------------------------------------- - -.. automodule:: silx.gui.plot.tools.profile - -.. currentmodule:: silx.gui.plot.tools.profile - -:class:`ScatterProfileToolBar` -++++++++++++++++++++++++++++++ - -.. autoclass:: ScatterProfileToolBar - :members: sigProfileChanged, getProfilePoints, getProfileValues, getProfileTitle, getPlotWidget, isDefaultProfileWindowEnabled, setDefaultProfileWindowEnabled, getDefaultProfileWindow, getColor, setColor, clearProfile, getNPoints, setNPoints - -.. currentmodule:: silx.gui.plot - :mod:`ColorBar`: ColorBar Widget ================================ diff --git a/doc/source/modules/gui/plot/tools/profile.rst b/doc/source/modules/gui/plot/tools/profile.rst new file mode 100644 index 0000000..32d8a26 --- /dev/null +++ b/doc/source/modules/gui/plot/tools/profile.rst @@ -0,0 +1,84 @@ +.. currentmodule:: silx.gui.plot.tools.profile + +:mod:`~silx.gui.plot.tools.profile`: Profile tool for PlotWidget +================================================================ + +.. automodule:: silx.gui.plot.tools.profile + +The profile package is divided into several sub-modules. + +:mod:`~silx.gui.plot.tools.profile.manager` module +-------------------------------------------------- + +.. automodule:: silx.gui.plot.tools.profile.manager + +:class:`ProfileManager` class ++++++++++++++++++++++++++++++ + +.. autoclass:: ProfileManager + :show-inheritance: + :members: + +:class:`ProfileWindow` class +++++++++++++++++++++++++++++ + +.. autoclass:: ProfileWindow + :show-inheritance: + :members: + +:mod:`~silx.gui.plot.tools.profile.editors` module +-------------------------------------------------- + +.. automodule:: silx.gui.plot.tools.profile.editors + +:class:`ProfileRoiEditorAction` class ++++++++++++++++++++++++++++++++++++++ + +.. autoclass:: ProfileRoiEditorAction + :show-inheritance: + :members: + +:mod:`~silx.gui.plot.tools.profile.core` module +----------------------------------------------- + +.. automodule:: silx.gui.plot.tools.profile.core + +:class:`ProfileRoiMixIn` class +++++++++++++++++++++++++++++++ + +.. autoclass:: ProfileRoiMixIn + :show-inheritance: + :members: + +:class:`CurveProfileData` class ++++++++++++++++++++++++++++++++ + +.. autoclass:: CurveProfileData + :show-inheritance: + :members: + + +:class:`ImageProfileData` class ++++++++++++++++++++++++++++++++ + +.. autoclass:: ImageProfileData + :show-inheritance: + :members: + +:mod:`~silx.gui.plot.tools.profile.ScatterProfileToolBar` module +---------------------------------------------------------------- + +.. automodule:: silx.gui.plot.tools.profile.ScatterProfileToolBar + +:class:`ScatterProfileToolBar` +++++++++++++++++++++++++++++++ + +.. autoclass:: ScatterProfileToolBar + :show-inheritance: + :members: + +:mod:`~silx.gui.plot.tools.profile.rois` module +----------------------------------------------- + +.. automodule:: silx.gui.plot.tools.profile.rois + diff --git a/doc/source/modules/gui/plot/utils.rst b/doc/source/modules/gui/plot/utils.rst new file mode 100644 index 0000000..e930208 --- /dev/null +++ b/doc/source/modules/gui/plot/utils.rst @@ -0,0 +1,12 @@ +.. currentmodule:: silx.gui.plot.utils + + +:mod:`axis`: utilities for plots +================================ + +SyncAxes +-------- + +.. autoclass:: silx.gui.plot.utils.axis.SyncAxes + :members: + |