diff options
author | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2018-07-31 16:22:25 +0200 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2018-07-31 16:22:25 +0200 |
commit | 159ef14fb9e198bb0066ea14e6b980f065de63dd (patch) | |
tree | bc37c7d4ba09ee59deb708897fa0571709aec293 /doc/source/modules/gui/plot | |
parent | 270d5ddc31c26b62379e3caa9044dd75ccc71847 (diff) |
New upstream version 0.8.0+dfsg
Diffstat (limited to 'doc/source/modules/gui/plot')
19 files changed, 241 insertions, 85 deletions
diff --git a/doc/source/modules/gui/plot/colormap.rst b/doc/source/modules/gui/plot/colormap.rst deleted file mode 100644 index a492605..0000000 --- a/doc/source/modules/gui/plot/colormap.rst +++ /dev/null @@ -1,16 +0,0 @@ - -.. currentmodule:: silx.gui.plot.Colormap - -:mod:`Colormap`: Colormap API -============================= - -.. automodule:: silx.gui.plot.Colormap - -.. currentmodule:: silx.gui.plot.Colormap - -:class:`Colormap` class ------------------------ - -.. autoclass:: Colormap - :show-inheritance: - :members: diff --git a/doc/source/modules/gui/plot/dev.rst b/doc/source/modules/gui/plot/dev.rst index b793b01..d7d4581 100644 --- a/doc/source/modules/gui/plot/dev.rst +++ b/doc/source/modules/gui/plot/dev.rst @@ -20,7 +20,6 @@ The different events emitted by :class:`Plot` and by the interaction modes are c The :class:`PlotWindow` uses additional widgets: -- :mod:`.ColormapDialog` to change colormap settings. - :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. @@ -39,7 +38,6 @@ The :class:`PlotWindow` uses additional widgets: The widgets also use the following miscellaneous modules: -- :mod:`.Colors` to convert colors from name to RGB(A) - :mod:`._utils`: utility functions The :mod:`backends` package provide the implementation of the rendering used by the :class:`Plot`. @@ -88,22 +86,6 @@ The following modules are the modules used internally by the plot package. .. automodule:: silx.gui.plot.backends.BackendMatplotlib :members: -:mod:`ColormapDialog` -+++++++++++++++++++++ - -.. currentmodule:: silx.gui.plot.ColormapDialog - -.. automodule:: silx.gui.plot.ColormapDialog - :members: - -:mod:`Colors` -+++++++++++++ - -.. currentmodule:: silx.gui.plot.Colors - -.. automodule:: silx.gui.plot.Colors - :members: rgba - :mod:`CurvesROIWidget` ++++++++++++++++++++++ diff --git a/doc/source/modules/gui/plot/getting_started.rst b/doc/source/modules/gui/plot/getting_started.rst index bfea8f2..412cc11 100644 --- a/doc/source/modules/gui/plot/getting_started.rst +++ b/doc/source/modules/gui/plot/getting_started.rst @@ -20,7 +20,9 @@ For a complete description of the API, see :mod:`silx.gui.plot`. Use :mod:`silx.gui.plot` from (I)Python console ----------------------------------------------- -The simplest way is to import the :mod:`silx.sx` module: +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 @@ -28,19 +30,27 @@ The :mod:`silx.sx` module initialises Qt and provides access to :mod:`silx.gui.p .. note:: The :mod:`silx.sx` module does NOT initialise Qt and does NOT expose silx widget in a notebook. +An alternative to run :mod:`silx.gui` widgets from `IPython <http://ipython.org/>`_, +is to set IPython to use Qt(5), e.g., with the `--gui` option:: + + ipython --gui=qt5 + + Compatibility with IPython ++++++++++++++++++++++++++ -To run :mod:`silx.gui` widgets from `IPython <http://ipython.org/>`_, -IPython must be set to use Qt (and in case of using PyQt4 and Python 2.7, -PyQt must be set to use API version 2, see note below for explanation). - -As *silx* is configuring the Qt binding and `matplotlib <http://matplotlib.org/>`_, the safest way to use *silx* from IPython is to import :mod:`silx.gui.plot` first and then run either `%gui <http://ipython.org/ipython-doc/stable/interactive/magics.html#magic-gui>`_ qt or `%pylab <http://ipython.org/ipython-doc/stable/interactive/magics.html#magic-pylab>`_ qt:: +silx widgets require Qt to be initialized. +If Qt is not yet loaded, silx tries to load PyQt5 first before trying other supported bindings. - In [1]: from silx.gui.plot import * - In [2]: %pylab qt +With versions of IPython lower than 3.0 (e.g., on Debian 8), there is an incompatibility between +the way silx loads Qt and the way IPython is doing it through the ``--gui`` option, +`%gui <http://ipython.org/ipython-doc/stable/interactive/magics.html#magic-gui>`_ or +`%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. -Alternatively, when using Python 2.7 and PyQt4, you can start IPython with the ``QT_API`` environment variable set to ``pyqt``. +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:: @@ -289,7 +299,7 @@ A ``colormap`` is described with a :class:`.Colormap` class as follows: .. code-block:: python - from silx.gui.plot.Colormap import Colormap + from silx.gui.colors import Colormap colormap = Colormap(name='gray', # Name of the colormap normalization='linear', # Either 'linear' or 'log' @@ -317,7 +327,7 @@ It is possible to change the default colormap of the plot widget by :meth:`.Plot .. code-block:: python - from silx.gui.plot.Colormap import Colormap + from silx.gui.colors import Colormap colormap = Colormap(name='viridis', normalization='linear', diff --git a/doc/source/modules/gui/plot/img/ScatterView.png b/doc/source/modules/gui/plot/img/ScatterView.png Binary files differnew file mode 100644 index 0000000..a8116b9 --- /dev/null +++ b/doc/source/modules/gui/plot/img/ScatterView.png diff --git a/doc/source/modules/gui/plot/img/netArea.png b/doc/source/modules/gui/plot/img/netArea.png Binary files differnew file mode 100644 index 0000000..f987d1f --- /dev/null +++ b/doc/source/modules/gui/plot/img/netArea.png diff --git a/doc/source/modules/gui/plot/img/netCounts.png b/doc/source/modules/gui/plot/img/netCounts.png Binary files differindex f987d1f..9f7d2a0 100644 --- a/doc/source/modules/gui/plot/img/netCounts.png +++ b/doc/source/modules/gui/plot/img/netCounts.png diff --git a/doc/source/modules/gui/plot/img/rawArea.png b/doc/source/modules/gui/plot/img/rawArea.png Binary files differnew file mode 100644 index 0000000..fa36b8e --- /dev/null +++ b/doc/source/modules/gui/plot/img/rawArea.png diff --git a/doc/source/modules/gui/plot/img/rawCounts.png b/doc/source/modules/gui/plot/img/rawCounts.png Binary files differindex fa36b8e..6382438 100644 --- a/doc/source/modules/gui/plot/img/rawCounts.png +++ b/doc/source/modules/gui/plot/img/rawCounts.png diff --git a/doc/source/modules/gui/plot/img/statsWidget.png b/doc/source/modules/gui/plot/img/statsWidget.png Binary files differnew file mode 100644 index 0000000..7e18ec4 --- /dev/null +++ b/doc/source/modules/gui/plot/img/statsWidget.png diff --git a/doc/source/modules/gui/plot/index.rst b/doc/source/modules/gui/plot/index.rst index ab1c7df..5cda6d8 100644 --- a/doc/source/modules/gui/plot/index.rst +++ b/doc/source/modules/gui/plot/index.rst @@ -25,22 +25,40 @@ See :ref:`plot-gallery` gallery. Public modules -------------- +Main plot widgets: + .. toctree:: :maxdepth: 2 plotwidget.rst plotwindow.rst + compleximageview.rst imageview.rst stackview.rst - compleximageview.rst - colormap.rst + scatterview.rst + +Classes describing plot content: + +- :class:`~silx.gui.colors.Colormap` + +.. toctree:: + :maxdepth: 2 + items.rst + +Additionnal plot tool widgets: + +.. toctree:: + :maxdepth: 2 + actions/index.rst plottoolbuttons.rst - plottools.rst + tools.rst profile.rst roi.rst printpreviewtoolbutton.rst + statswidget.rst + stats/index.rst Internals --------- diff --git a/doc/source/modules/gui/plot/items.rst b/doc/source/modules/gui/plot/items.rst index 3cdcf17..eb3ca1a 100644 --- a/doc/source/modules/gui/plot/items.rst +++ b/doc/source/modules/gui/plot/items.rst @@ -108,3 +108,10 @@ Axis .. autoclass:: Axis :members: + + +:mod:`~silx.gui.plot.items.roi`: Regions of Interest +---------------------------------------------------- + +.. automodule:: silx.gui.plot.items.roi + :members: diff --git a/doc/source/modules/gui/plot/plottools.rst b/doc/source/modules/gui/plot/plottools.rst deleted file mode 100644 index 4cf8f88..0000000 --- a/doc/source/modules/gui/plot/plottools.rst +++ /dev/null @@ -1,36 +0,0 @@ -:mod:`PlotTools`: Tool widgets for PlotWidget -============================================= - -.. currentmodule:: silx.gui.plot.PlotTools - -.. automodule:: silx.gui.plot.PlotTools - -:class:`PositionInfo` class ---------------------------- - -.. autoclass:: PositionInfo - :show-inheritance: - :members: - -:class:`LimitsToolBar` class ----------------------------- - -.. autoclass:: LimitsToolBar - :show-inheritance: - :members: - - -.. currentmodule:: silx.gui.plot - -:mod:`ColorBar`: ColorBar Widget -================================ - -.. currentmodule:: silx.gui.plot.ColorBar - -.. automodule:: silx.gui.plot.ColorBar - -:class:`ColorBarWidget` class ------------------------------ - -.. autoclass:: ColorBarWidget - :members: diff --git a/doc/source/modules/gui/plot/plotwidget.rst b/doc/source/modules/gui/plot/plotwidget.rst index d045f92..4ce69f7 100644 --- a/doc/source/modules/gui/plot/plotwidget.rst +++ b/doc/source/modules/gui/plot/plotwidget.rst @@ -148,7 +148,6 @@ Misc. .. automethod:: PlotWidget.getWidgetHandle .. automethod:: PlotWidget.saveGraph -.. automethod:: PlotWidget.setDefaultBackend Signals ....... diff --git a/doc/source/modules/gui/plot/scatterview.rst b/doc/source/modules/gui/plot/scatterview.rst new file mode 100644 index 0000000..6a0cf93 --- /dev/null +++ b/doc/source/modules/gui/plot/scatterview.rst @@ -0,0 +1,20 @@ + +.. currentmodule:: silx.gui.plot + +:mod:`ScatterView`: Plot 2D scatter data +======================================== + +.. automodule:: silx.gui.plot.ScatterView + +.. currentmodule:: silx.gui.plot.ScatterView + +.. image:: img/ScatterView.png + :height: 400px + :align: center + +:class:`ScatterView` class +-------------------------- + +.. autoclass:: ScatterView + :show-inheritance: + :members:
\ No newline at end of file diff --git a/doc/source/modules/gui/plot/stats/index.rst b/doc/source/modules/gui/plot/stats/index.rst new file mode 100644 index 0000000..ccfb3f9 --- /dev/null +++ b/doc/source/modules/gui/plot/stats/index.rst @@ -0,0 +1,18 @@ +.. currentmodule:: silx.gui.plot.stats + +:mod:`stats`: Stats for PlotWidget +================================================= + +.. automodule:: silx.gui.plot.stats + +stats API +--------- + +Actions are divided into the following sub-modules: + + +.. toctree:: + :maxdepth: 1 + + stats.rst + statshandler.rst
\ No newline at end of file diff --git a/doc/source/modules/gui/plot/stats/stats.rst b/doc/source/modules/gui/plot/stats/stats.rst new file mode 100644 index 0000000..717f6eb --- /dev/null +++ b/doc/source/modules/gui/plot/stats/stats.rst @@ -0,0 +1,6 @@ +:mod:`silx.gui.plot.stats.stats` +```````````````````````````````` +.. currentmodule:: silx.gui.plot.stats.stats + +.. automodule:: silx.gui.plot.stats.stats + :members: diff --git a/doc/source/modules/gui/plot/stats/statshandler.rst b/doc/source/modules/gui/plot/stats/statshandler.rst new file mode 100644 index 0000000..01d56f3 --- /dev/null +++ b/doc/source/modules/gui/plot/stats/statshandler.rst @@ -0,0 +1,7 @@ +:mod:`silx.gui.plot.stats.statshandler` +``````````````````````````````````````` + +.. currentmodule:: silx.gui.plot.stats.statshandler + +.. automodule:: silx.gui.plot.stats.statshandler + :members: diff --git a/doc/source/modules/gui/plot/statswidget.rst b/doc/source/modules/gui/plot/statswidget.rst new file mode 100644 index 0000000..f534921 --- /dev/null +++ b/doc/source/modules/gui/plot/statswidget.rst @@ -0,0 +1,33 @@ + +.. currentmodule:: silx.gui.plot + +:mod:`StatsWidget`: Display a set of statictics for plot items +============================================================== + +.. automodule:: silx.gui.plot.StatsWidget + +.. currentmodule:: silx.gui.plot.StatsWidget + +:class:`StatsWidget` class +-------------------------- + +.. autoclass:: StatsWidget + :show-inheritance: + :members: + + +:class:`BasicStatsWidget` class +------------------------------- + +.. autoclass:: BasicStatsWidget + :show-inheritance: + :members: + + +:class:`StatsTable` class +------------------------- + +.. autoclass:: StatsTable + :show-inheritance: + :members: + diff --git a/doc/source/modules/gui/plot/tools.rst b/doc/source/modules/gui/plot/tools.rst new file mode 100644 index 0000000..766c8f1 --- /dev/null +++ b/doc/source/modules/gui/plot/tools.rst @@ -0,0 +1,108 @@ +:mod:`~silx.gui.plot.tools`: Tool widgets for PlotWidget +======================================================== + +.. currentmodule:: silx.gui.plot.tools + +.. automodule:: silx.gui.plot.tools + +:class:`PositionInfo` class +--------------------------- + +.. autoclass:: PositionInfo + :show-inheritance: + :members: + +:class:`LimitsToolBar` class +---------------------------- + +.. autoclass:: LimitsToolBar + :show-inheritance: + :members: + +:class:`InteractiveModeToolBar` class +------------------------------------- + +.. autoclass:: InteractiveModeToolBar + :show-inheritance: + :members: + +:class:`OutputToolBar` class +---------------------------- + +.. autoclass:: OutputToolBar + :show-inheritance: + :members: + +:class:`ImageToolBar` class +---------------------------- + +.. autoclass:: ImageToolBar + :show-inheritance: + :members: + +:class:`CurveToolBar` class +---------------------------- + +.. autoclass:: CurveToolBar + :show-inheritance: + :members: + +:class:`ScatterToolBar` class +----------------------------- + +.. autoclass:: ScatterToolBar + :show-inheritance: + :members: + +:mod:`~silx.gui.plot.tools.roi`: Region of interest +--------------------------------------------------- + +.. automodule:: silx.gui.plot.tools.roi + +.. currentmodule:: silx.gui.plot.tools.roi + +:class:`RegionOfInterestManager` class +++++++++++++++++++++++++++++++++++++++ + +.. autoclass:: RegionOfInterestManager + :members: + +:class:`InteractiveRegionOfInterestManager` class ++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. autoclass:: InteractiveRegionOfInterestManager + :members: + +:class:`RegionOfInterestTableWidget` class +++++++++++++++++++++++++++++++++++++++++++ + +.. 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 +================================ + +.. currentmodule:: silx.gui.plot.ColorBar + +.. automodule:: silx.gui.plot.ColorBar + +:class:`ColorBarWidget` class +----------------------------- + +.. autoclass:: ColorBarWidget + :members: |