summaryrefslogtreecommitdiff
path: root/doc/source/modules/gui/plot
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/modules/gui/plot')
-rw-r--r--doc/source/modules/gui/plot/actions/control.rst5
-rw-r--r--doc/source/modules/gui/plot/actions/examples.rst (renamed from doc/source/modules/gui/plot/plotactions_examples.rst)6
-rw-r--r--doc/source/modules/gui/plot/actions/fit.rst5
-rw-r--r--doc/source/modules/gui/plot/actions/histogram.rst5
-rw-r--r--doc/source/modules/gui/plot/actions/img/fftAction0.png (renamed from doc/source/modules/gui/plot/img/fftAction0.png)bin91165 -> 91165 bytes
-rw-r--r--doc/source/modules/gui/plot/actions/img/fftAction1.png (renamed from doc/source/modules/gui/plot/img/fftAction1.png)bin38847 -> 38847 bytes
-rw-r--r--doc/source/modules/gui/plot/actions/img/shiftAction0.png (renamed from doc/source/modules/gui/plot/img/shiftAction0.png)bin29092 -> 29092 bytes
-rw-r--r--doc/source/modules/gui/plot/actions/img/shiftAction3.png (renamed from doc/source/modules/gui/plot/img/shiftAction3.png)bin25949 -> 25949 bytes
-rw-r--r--doc/source/modules/gui/plot/actions/index.rst30
-rw-r--r--doc/source/modules/gui/plot/actions/io.rst6
-rw-r--r--doc/source/modules/gui/plot/actions/medfilt.rst5
-rw-r--r--doc/source/modules/gui/plot/colormap.rst16
-rw-r--r--doc/source/modules/gui/plot/compleximageview.rst19
-rw-r--r--doc/source/modules/gui/plot/dev.rst20
-rw-r--r--doc/source/modules/gui/plot/getting_started.rst52
-rw-r--r--doc/source/modules/gui/plot/imageview.rst6
-rw-r--r--doc/source/modules/gui/plot/img/ComplexImageView.pngbin0 -> 72268 bytes
-rw-r--r--doc/source/modules/gui/plot/img/printPreviewMultiPlot.pngbin0 -> 25948 bytes
-rw-r--r--doc/source/modules/gui/plot/index.rst92
-rw-r--r--doc/source/modules/gui/plot/items.rst83
-rw-r--r--doc/source/modules/gui/plot/plot.rst16
-rw-r--r--doc/source/modules/gui/plot/plotactions.rst20
-rw-r--r--doc/source/modules/gui/plot/plotwidget.rst138
-rw-r--r--doc/source/modules/gui/plot/printpreviewtoolbutton.rst8
-rw-r--r--doc/source/modules/gui/plot/stackview.rst4
25 files changed, 289 insertions, 247 deletions
diff --git a/doc/source/modules/gui/plot/actions/control.rst b/doc/source/modules/gui/plot/actions/control.rst
new file mode 100644
index 0000000..b35986d
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/control.rst
@@ -0,0 +1,5 @@
+:mod:`silx.gui.plot.actions.control`
+````````````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.control
+ :members:
diff --git a/doc/source/modules/gui/plot/plotactions_examples.rst b/doc/source/modules/gui/plot/actions/examples.rst
index f14a42a..125e9c5 100644
--- a/doc/source/modules/gui/plot/plotactions_examples.rst
+++ b/doc/source/modules/gui/plot/actions/examples.rst
@@ -17,7 +17,7 @@ Simple example: Shift a curve
The following script is a simplistic example to show the basic required steps:
- - create a new class inheriting from :class:`silx.gui.plot.PlotActions.PlotAction`
+ - create a new class inheriting from :class:`silx.gui.plot.actions.PlotAction`
- define basic parameters such as the icon, the tooltip...
- write a method that will be triggered by the action
- initialize the new plot action by passing a reference to a plot window
@@ -27,7 +27,7 @@ The method implemented in this action interacts with the plot in a basic way. It
then it creates a new data array based on the curve data, and finally it replaces the original curve
with a new one using the modified data array.
-.. literalinclude:: ../../../../../examples/shiftPlotAction.py
+.. literalinclude:: ../../../../../../examples/shiftPlotAction.py
:lines: 36-
.. |imgShiftAction0| image:: img/shiftAction0.png
@@ -66,7 +66,7 @@ the amplitude spectrum. However, the inverse FFT requires the complete FFT data
We are therefore required to store the complex array of FFT data as curve metadata,
in order to be able to reverse the process when the action is unchecked.
-.. literalinclude:: ../../../../../examples/fftPlotAction.py
+.. literalinclude:: ../../../../../../examples/fftPlotAction.py
:lines: 44-
.. |imgFftAction0| image:: img/fftAction0.png
diff --git a/doc/source/modules/gui/plot/actions/fit.rst b/doc/source/modules/gui/plot/actions/fit.rst
new file mode 100644
index 0000000..8b06908
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/fit.rst
@@ -0,0 +1,5 @@
+:mod:`silx.gui.plot.actions.fit`
+````````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.fit
+ :members:
diff --git a/doc/source/modules/gui/plot/actions/histogram.rst b/doc/source/modules/gui/plot/actions/histogram.rst
new file mode 100644
index 0000000..6a31236
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/histogram.rst
@@ -0,0 +1,5 @@
+:mod:`silx.gui.plot.actions.histogram`
+``````````````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.histogram
+ :members:
diff --git a/doc/source/modules/gui/plot/img/fftAction0.png b/doc/source/modules/gui/plot/actions/img/fftAction0.png
index 5bd8061..5bd8061 100644
--- a/doc/source/modules/gui/plot/img/fftAction0.png
+++ b/doc/source/modules/gui/plot/actions/img/fftAction0.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/img/fftAction1.png b/doc/source/modules/gui/plot/actions/img/fftAction1.png
index e4b20d7..e4b20d7 100644
--- a/doc/source/modules/gui/plot/img/fftAction1.png
+++ b/doc/source/modules/gui/plot/actions/img/fftAction1.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/img/shiftAction0.png b/doc/source/modules/gui/plot/actions/img/shiftAction0.png
index 2d5837a..2d5837a 100644
--- a/doc/source/modules/gui/plot/img/shiftAction0.png
+++ b/doc/source/modules/gui/plot/actions/img/shiftAction0.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/img/shiftAction3.png b/doc/source/modules/gui/plot/actions/img/shiftAction3.png
index a2187b8..a2187b8 100644
--- a/doc/source/modules/gui/plot/img/shiftAction3.png
+++ b/doc/source/modules/gui/plot/actions/img/shiftAction3.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/actions/index.rst b/doc/source/modules/gui/plot/actions/index.rst
new file mode 100644
index 0000000..f95b1f8
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/index.rst
@@ -0,0 +1,30 @@
+.. currentmodule:: silx.gui.plot
+
+:mod:`actions`: Actions for PlotWidget
+===========================================
+
+.. currentmodule:: silx.gui.plot.actions
+
+The :class:`PlotAction` is a base class used to define plot actions.
+
+Plot actions serve to add menu items or toolbar items that are associated with a method
+that can interact with the associated :class:`.PlotWidget`.
+
+For an introduction to creating custom plot actions, see :doc:`examples`.
+
+actions API
+-----------
+
+Actions are divided into the following sub-modules:
+
+
+.. toctree::
+ :maxdepth: 1
+
+ control.rst
+ medfilt.rst
+ fit.rst
+ histogram.rst
+ io.rst
+
+.. autoclass:: silx.gui.plot.actions.PlotAction
diff --git a/doc/source/modules/gui/plot/actions/io.rst b/doc/source/modules/gui/plot/actions/io.rst
new file mode 100644
index 0000000..98f1808
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/io.rst
@@ -0,0 +1,6 @@
+:mod:`silx.gui.plot.actions.io`
+```````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.io
+ :members:
+
diff --git a/doc/source/modules/gui/plot/actions/medfilt.rst b/doc/source/modules/gui/plot/actions/medfilt.rst
new file mode 100644
index 0000000..25f5af1
--- /dev/null
+++ b/doc/source/modules/gui/plot/actions/medfilt.rst
@@ -0,0 +1,5 @@
+:mod:`silx.gui.plot.actions.medfilt`
+````````````````````````````````````
+
+.. automodule:: silx.gui.plot.actions.medfilt
+ :members:
diff --git a/doc/source/modules/gui/plot/colormap.rst b/doc/source/modules/gui/plot/colormap.rst
new file mode 100644
index 0000000..a492605
--- /dev/null
+++ b/doc/source/modules/gui/plot/colormap.rst
@@ -0,0 +1,16 @@
+
+.. 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/compleximageview.rst b/doc/source/modules/gui/plot/compleximageview.rst
new file mode 100644
index 0000000..d9009eb
--- /dev/null
+++ b/doc/source/modules/gui/plot/compleximageview.rst
@@ -0,0 +1,19 @@
+
+.. currentmodule:: silx.gui.plot
+
+:mod:`ComplexImageView`: Plot a 2D array of complex
+===================================================
+
+.. automodule:: silx.gui.plot.ComplexImageView
+
+.. currentmodule:: silx.gui.plot.ComplexImageView
+
+.. image:: img/ComplexImageView.png
+ :height: 400px
+ :align: center
+
+:class:`ComplexImageView` class
+-------------------------------
+
+.. autoclass:: ComplexImageView
+ :members:
diff --git a/doc/source/modules/gui/plot/dev.rst b/doc/source/modules/gui/plot/dev.rst
index 707d215..b793b01 100644
--- a/doc/source/modules/gui/plot/dev.rst
+++ b/doc/source/modules/gui/plot/dev.rst
@@ -10,7 +10,7 @@ This package is structured as follows.
: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:`.PlotActions`.
+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`.
@@ -40,7 +40,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:`.MPLColormap` to embed recent matplotlib colormaps: 'magma', 'inferno', 'plasma' and 'viridis'.
- :mod:`._utils`: utility functions
The :mod:`backends` package provide the implementation of the rendering used by the :class:`Plot`.
@@ -89,15 +88,6 @@ The following modules are the modules used internally by the plot package.
.. automodule:: silx.gui.plot.backends.BackendMatplotlib
:members:
-:mod:`backends.ModestImage`
-+++++++++++++++++++++++++++
-
-.. currentmodule:: silx.gui.plot.backends.ModestImage
-
-.. automodule:: silx.gui.plot.backends.ModestImage
- :members:
- :undoc-members:
-
:mod:`ColormapDialog`
+++++++++++++++++++++
@@ -164,14 +154,6 @@ The following modules are the modules used internally by the plot package.
:members:
:show-inheritance:
-:mod:`MPLColormap`
-++++++++++++++++++
-
-.. currentmodule:: silx.gui.plot.MPLColormap
-
-.. automodule:: silx.gui.plot.MPLColormap
- :members:
-
:mod:`PlotEvents`
+++++++++++++++++
diff --git a/doc/source/modules/gui/plot/getting_started.rst b/doc/source/modules/gui/plot/getting_started.rst
index 9e45b70..484d3f7 100644
--- a/doc/source/modules/gui/plot/getting_started.rst
+++ b/doc/source/modules/gui/plot/getting_started.rst
@@ -157,6 +157,7 @@ a module from :mod:`silx.gui`:
.. warning::
+
:mod:`silx.gui.plot` widgets are not thread-safe.
All calls to :mod:`silx.gui.plot` widgets must be made from the main thread.
@@ -342,17 +343,15 @@ When updating an image, if ``origin`` and ``scale`` are not provided, the previo
Colormap
++++++++
-A ``colormap`` is described with a :class:`dict` as follows (See :mod:`silx.gui.plot.Plot` for full documentation of the colormap):
+A ``colormap`` is described with a :class:`.Colormap` class as follows:
.. code-block:: python
- colormap = {
- 'name': 'gray', # Name of the colormap
- 'normalization': 'linear', # Either 'linear' or 'log'
- 'autoscale': True, # True to autoscale colormap to data range, False to use [vmin, vmax]
- 'vmin': 0.0, # If not autoscale, data value to bind to min of colormap
- 'vmax': 1.0 # If not autoscale, data value to bind to max of colormap
- }
+ colormap = Colormap(name='gray', # Name of the colormap
+ normalization='linear', # Either 'linear' or 'log'
+ vmin=0.0, # If not autoscale, data value to bind to min of colormap
+ vmax=1.0 # If not autoscale, data value to bind to max of colormap
+ )
At least the following colormap names are guaranteed to be available, but any colormap name from `matplotlib <http://matplotlib.org/>`_ (see `Choosing Colormaps <http://matplotlib.org/users/colormaps.html>`_) should work:
@@ -372,19 +371,23 @@ It is possible to change the default colormap of :meth:`.PlotWidget.addImage` fo
.. code-block:: python
- colormap = {'name': 'viridis', 'normalization': 'linear',
- 'autoscale': True, 'vmin': 0.0, 'vmax': 1.0}
+ colormap = Colormap(name='viridis',
+ normalization='linear',
+ vmin=0.0,
+ vmax=1.0)
plot.setDefaultColormap(colormap)
data = numpy.arange(512 * 512.).reshape(512, -1)
plot.addImage(data) # Rendered with the default colormap set before
-It is also possible to provide a ``colormap`` to :meth:`.PlotWidget.addImage` to override this default for an image:
+It is also possible to provide a :class:`.Colormap` to :meth:`.PlotWidget.addImage` to override this default for an image:
.. code-block:: python
- colormap = {'name': 'magma', 'normalization': 'log',
- 'autoscale': False, 'vmin': 1.2, 'vmax': 1.8}
+ colormap = Colormap(name='magma',
+ normalization='log',
+ vmin=1.2,
+ vmax=1.8)
data = numpy.random.random(512 * 512).reshape(512, -1) + 1.
plot.addImage(data, colormap=colormap)
@@ -432,18 +435,19 @@ Control plot axes
-----------------
The following examples illustrate the API to control the plot axes.
+:meth:`.PlotWidget.getXAxis` and :meth:`.PlotWidget.getYAxis` give access to each plot axis (:class:`.items.Axis`) in order to control them.
Labels and title
++++++++++++++++
Use :meth:`.PlotWidget.setGraphTitle` to set the plot main title.
-Use :meth:`.PlotWidget.setGraphXLabel` and :meth:`.PlotWidget.setGraphYLabel` to set the axes text labels:
+Use :meth:`.PlotWidget.getXAxis` and :meth:`.PlotWidget.getYAxis` to get the axes and set their text label with :meth:`.items.Axis.setLabel`:
.. code-block:: python
plot.setGraphTitle('My plot')
- plot.setGraphXLabel('X')
- plot.setGraphYLabel('Y')
+ plot.getXAxis().setLabel('X')
+ plot.getYAxis().setLabel('Y')
Axes limits
@@ -455,9 +459,9 @@ The following code moves the visible plot area to the right:
.. code-block:: python
- xmin, xmax = plot.getGraphXLimits()
+ xmin, xmax = plot.getXAxis().getLimits()
offset = 0.1 * (xmax - xmin)
- plot.setGraphXLimits(xmin + offset, xmax + offset)
+ plot.getXAxis().setLimits(xmin + offset, xmax + offset)
:meth:`.PlotWidget.resetZoom` set the plot limits to the bounds of the data:
@@ -465,7 +469,7 @@ The following code moves the visible plot area to the right:
plot.resetZoom()
-See :meth:`.PlotWidget.resetZoom`, :meth:`.PlotWidget.setLimits`, :meth:`.PlotWidget.getGraphXLimits`, :meth:`.PlotWidget.setGraphXLimits`, :meth:`.PlotWidget.getGraphYLimits`, :meth:`.PlotWidget.setGraphYLimits` for details.
+See :meth:`.PlotWidget.resetZoom`, :meth:`.PlotWidget.setLimits`, :meth:`.PlotWidget.getXAxis`, :meth:`.PlotWidget.getYAxis` and :class:`.items.Axis` for details.
Axes
@@ -475,17 +479,17 @@ Different methods allow plot axes modifications:
.. code-block:: python
- plot.setYAxisInverted(True) # Makes the Y axis pointing downward
+ plot.getYAxis().setInverted(True) # Makes the Y axis pointing downward
plot.setKeepDataAspectRatio(True) # To keep aspect ratio between X and Y axes
-See :meth:`.PlotWidget.setYAxisInverted`, :meth:`.PlotWidget.setKeepDataAspectRatio` for details.
+See :meth:`.PlotWidget.getYAxis`, :meth:`.PlotWidget.setKeepDataAspectRatio` for details.
.. code-block:: python
plot.setGraphGrid(which='both') # To show a grid for both minor and major axes ticks
# Use logarithmic axes
- plot.setXAxisLogarithmic(True)
- plot.setYAxisLogarithmic(True)
+ plot.getXAxis().setScale("log")
+ plot.getYAxis().setScale("log")
-See :meth:`.PlotWidget.setGraphGrid`, :meth:`.PlotWidget.setXAxisLogarithmic`, :meth:`.PlotWidget.setYAxisLogarithmic` for details.
+See :meth:`.PlotWidget.setGraphGrid`, :meth:`.PlotWidget.getXAxis`, :meth:`.PlotWidget.getXAxis` and :class:`.items.Axis` for details.
diff --git a/doc/source/modules/gui/plot/imageview.rst b/doc/source/modules/gui/plot/imageview.rst
index c2663c7..f03868b 100644
--- a/doc/source/modules/gui/plot/imageview.rst
+++ b/doc/source/modules/gui/plot/imageview.rst
@@ -6,10 +6,12 @@
.. automodule:: silx.gui.plot.ImageView
-.. currentmodule:: silx.gui.plot.ImageView
+.. image:: img/ImageView.png
+ :height: 400
+ :align: center
:class:`ImageView` class
------------------------
.. autoclass:: ImageView
- :members: valueChanged, profile, setImage, getColormap, setColormap, getHistogram, setGraphTitle, setGraphXLabel, setGraphYLabel
+ :members: valueChanged, setImage, getColormap, setColormap, getHistogram, setGraphTitle, getXAxis, getYAxis
diff --git a/doc/source/modules/gui/plot/img/ComplexImageView.png b/doc/source/modules/gui/plot/img/ComplexImageView.png
new file mode 100644
index 0000000..3f8b502
--- /dev/null
+++ b/doc/source/modules/gui/plot/img/ComplexImageView.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/img/printPreviewMultiPlot.png b/doc/source/modules/gui/plot/img/printPreviewMultiPlot.png
new file mode 100644
index 0000000..4ce42b3
--- /dev/null
+++ b/doc/source/modules/gui/plot/img/printPreviewMultiPlot.png
Binary files differ
diff --git a/doc/source/modules/gui/plot/index.rst b/doc/source/modules/gui/plot/index.rst
index 143b85b..b77bbcc 100644
--- a/doc/source/modules/gui/plot/index.rst
+++ b/doc/source/modules/gui/plot/index.rst
@@ -15,94 +15,12 @@
For an introduction to the widgets of this package, see :doc:`getting_started`.
-For examples of custom plot actions, see :doc:`plotactions_examples`.
+For examples of custom plot actions, see :doc:`actions/examples`.
Widgets gallery
---------------
-The :mod:`silx.gui.plot` package provides the following plotting widgets:
-
-.. |imgPlotWidget| image:: img/PlotWidget.png
- :height: 150px
- :align: middle
-
-.. |imgPlotWindow| image:: img/PlotWindow.png
- :height: 150px
- :align: middle
-
-.. |imgPlot1D| image:: img/Plot1D.png
- :height: 150px
- :align: middle
-
-.. |imgPlot2D| image:: img/Plot2D.png
- :height: 150px
- :align: middle
-
-.. |imgImageView| image:: img/ImageView.png
- :height: 150px
- :align: middle
-
-.. |imgStackView| image:: img/StackView.png
- :height: 150px
- :align: middle
-
-.. list-table::
- :widths: 1 4
- :header-rows: 1
-
- * - Widget
- - Description
- * - |imgPlotWidget|
- - :class:`PlotWidget` is the base Qt widget providing a plot area.
- Other plot widgets are based on this one and provides the same API.
- * - |imgPlotWindow|
- - :class:`PlotWindow` adds a toolbar to :class:`PlotWidget`.
- The content of this toolbar can be configured from the
- :class:`PlotWindow` constructor or by hiding its content afterward.
- * - |imgPlot1D|
- - :class:`.Plot1D` is a :class:`PlotWindow` configured with tools useful
- for curves.
- * - |imgPlot2D|
- - :class:`.Plot2D` is a :class:`PlotWindow` configured with tools useful
- for images.
- * - |imgImageView|
- - :class:`ImageView` adds side histograms to a :class:`.Plot2D` widget.
- * - |imgStackView|
- - :class:`StackView` is a widget designed to display an image from a
- stack of images in a :class:`PlotWindow` widget, with a frame browser
- to navigate in the stack. The profile tool can do a 2D profile on the
- stack of images.
-
-It also provides (and uses) widgets that can be attached to a :class:`PlotWidget`:
-
-.. |imgPositionInfo| image:: img/PositionInfo.png
- :width: 300px
- :align: middle
-
-.. |imgLimitsToolBar| image:: img/LimitsToolBar.png
- :width: 300px
- :align: middle
-
-.. |imgColorbar| image:: img/logColorbar.png
- :height: 150px
- :align: middle
-
-
-.. list-table::
- :widths: 1 4
- :header-rows: 1
-
- * - Widget
- - Description
- * - |imgPositionInfo|
- - :class:`.PlotTools.PositionInfo` is a widget displaying mouse position and
- information of a :class:`PlotWidget` associated to the mouse position.
- * - |imgLimitsToolBar|
- - :class:`.PlotTools.LimitsToolBar` is a QToolBar displaying and
- controlling the limits of a :class:`PlotWidget`.
- * - |imgColorbar|
- - :class:`.ColorBar.ColorBarWidget` display colormap gradient and can be linked with a plot
- to display the colormap
+See :ref:`plot-gallery` gallery.
Public modules
--------------
@@ -114,12 +32,14 @@ Public modules
plotwindow.rst
imageview.rst
stackview.rst
- plot.rst
+ compleximageview.rst
+ colormap.rst
items.rst
- plotactions.rst
+ actions/index.rst
plottools.rst
profile.rst
roi.rst
+ printpreviewtoolbutton.rst
Internals
---------
diff --git a/doc/source/modules/gui/plot/items.rst b/doc/source/modules/gui/plot/items.rst
index beba3a1..3cdcf17 100644
--- a/doc/source/modules/gui/plot/items.rst
+++ b/doc/source/modules/gui/plot/items.rst
@@ -8,56 +8,103 @@
.. currentmodule:: silx.gui.plot.items
+Item
+----
+
+All plot primitives inherits from :class:`Item` as a common ground:
+
+.. autoclass:: Item
+ :show-inheritance:
+ :members:
+
Curve
-----
.. autoclass:: Curve
- :members:
- :inherited-members:
+ :members: getData, getXData, getYData, getXErrorData, getYErrorData, setData,
+ getSymbol, setSymbol, getSymbolSize, setSymbolSize,
+ getAlpha, setAlpha,
+ getColor, setColor,
+ getYAxis, setYAxis,
+ isFill, setFill,
+ getXLabel, getYLabel,
+ getLineWidth, setLineWidth, getLineStyle, setLineStyle,
+ isHighlighted, setHighlighted, getHighlightedColor, setHighlightedColor,
+ getCurrentColor
Images
------
.. autoclass:: ImageData
- :members:
- :inherited-members:
+ :members: getData, getRgbaImageData,
+ getOrigin, setOrigin,
+ getScale, setScale,
+ isDraggable,
+ getAlpha, setAlpha,
+ getColormap, setColormap,
+ getAlternativeImageData
.. autoclass:: ImageRgba
- :members:
- :inherited-members:
+ :members: getData, getRgbaImageData,
+ getOrigin, setOrigin,
+ getScale, setScale,
+ isDraggable,
+ getAlpha, setAlpha
Scatter
-------
.. autoclass:: Scatter
- :members:
- :inherited-members:
+ :members: getValueData,
+ getData, getXData, getYData, getXErrorData, getYErrorData, setData,
+ getSymbol, setSymbol, getSymbolSize, setSymbolSize,
+ getAlpha, setAlpha,
+ getColormap, setColormap
Histogram
---------
.. autoclass:: Histogram
- :members:
- :inherited-members:
+ :members: getValueData, getBinEdgesData, getData, setData,
+ getAlpha, setAlpha,
+ getColor, setColor,
+ getYAxis, setYAxis,
+ isFill, setFill,
+ getLineWidth, setLineWidth, getLineStyle, setLineStyle
Markers
-------
.. autoclass:: Marker
- :members:
- :inherited-members:
+ :members: getText, setText, getXPosition, getYPosition, getPosition, setPosition, getConstraint,
+ getSymbol, setSymbol, getSymbolSize, setSymbolSize
.. autoclass:: XMarker
- :members:
- :inherited-members:
+ :members: getText, setText, getXPosition, getYPosition, getPosition, setPosition, getConstraint
.. autoclass:: YMarker
+ :members: getText, setText, getXPosition, getYPosition, getPosition, setPosition, getConstraint
+
+Shapes
+------
+
+.. autoclass:: Shape
+ :members: setOverlay,
+ getColor, setColor,
+ isFill, setFill,
+ getType, getPoints, setPoints
+
+Item changed signal
+-------------------
+
+Plot items emit a :attr:`Item.sigItemChanged` signal when their values are updated.
+This signal provides a flag in the following enumeration describing the modified value:
+
+.. autoclass:: ItemChangedType
:members:
- :inherited-members:
-Item
+Axis
----
-.. autoclass:: Shape
+.. autoclass:: Axis
:members:
- :inherited-members:
diff --git a/doc/source/modules/gui/plot/plot.rst b/doc/source/modules/gui/plot/plot.rst
deleted file mode 100644
index 2b8e096..0000000
--- a/doc/source/modules/gui/plot/plot.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-
-.. currentmodule:: silx.gui.plot
-
-:mod:`Plot`: Full plot API
-==========================
-
-.. automodule:: silx.gui.plot.Plot
-
-.. currentmodule:: silx.gui.plot.Plot
-
-:class:`Plot` class
--------------------
-
-.. autoclass:: Plot
- :show-inheritance:
- :members:
diff --git a/doc/source/modules/gui/plot/plotactions.rst b/doc/source/modules/gui/plot/plotactions.rst
deleted file mode 100644
index 29a3656..0000000
--- a/doc/source/modules/gui/plot/plotactions.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-
-.. currentmodule:: silx.gui.plot
-
-:mod:`PlotActions`: Actions for PlotWidget
-===========================================
-
-.. currentmodule:: silx.gui.plot.PlotActions
-
-The :class:`PlotAction` is a base class used to define plot actions.
-
-Plot actions serve to add menu items or toolbar items that are associated with a method
-that can interact with the associated :class:`PlotWidget`.
-
-For an introduction to creating custom plot actions, see :doc:`plotactions_examples`.
-
-PlotActions API
----------------
-
-.. automodule:: silx.gui.plot.PlotActions
- :members:
diff --git a/doc/source/modules/gui/plot/plotwidget.rst b/doc/source/modules/gui/plot/plotwidget.rst
index df576fc..a8e7831 100644
--- a/doc/source/modules/gui/plot/plotwidget.rst
+++ b/doc/source/modules/gui/plot/plotwidget.rst
@@ -14,13 +14,8 @@ It is the basis of other plot widget, thus all plot widgets share the same API.
For an introduction and examples of the plot API, see :doc:`getting_started`.
-Plot API
---------
-
-.. currentmodule:: silx.gui.plot.Plot
-
-This is a choosen subset of the complete plot API, the full API is
-documented in :class:`silx.gui.plot.Plot`.
+:class:`PlotWidget`
+-------------------
.. currentmodule:: silx.gui.plot.PlotWidget
@@ -37,6 +32,20 @@ Those methods allow to add and update plotted data:
.. automethod:: PlotWidget.addScatter
.. automethod:: PlotWidget.addHistogram
+Get data
+........
+
+Those methods return objects providing access to plotted data:
+
+.. automethod:: PlotWidget.getCurve
+.. automethod:: PlotWidget.getImage
+.. automethod:: PlotWidget.getScatter
+.. automethod:: PlotWidget.getHistogram
+
+.. automethod:: PlotWidget.getAllCurves
+.. automethod:: PlotWidget.getAllImages
+
+
Plot markers
............
@@ -52,59 +61,40 @@ Remove data from the plot
.. automethod:: PlotWidget.clear
.. automethod:: PlotWidget.remove
-Title and labels
-................
+Title
+.....
-Those methods handle the text labels of the axes and the plot title:
+Those methods handle the plot title:
.. automethod:: PlotWidget.getGraphTitle
.. automethod:: PlotWidget.setGraphTitle
-.. automethod:: PlotWidget.getGraphXLabel
-.. automethod:: PlotWidget.setGraphXLabel
-.. automethod:: PlotWidget.getGraphYLabel
-.. automethod:: PlotWidget.setGraphYLabel
-
-Axes limits
-...........
-
-Those methods change the range of data values displayed on each axis.
-
-.. automethod:: PlotWidget.getGraphXLimits
-.. automethod:: PlotWidget.setGraphXLimits
-.. automethod:: PlotWidget.getGraphYLimits
-.. automethod:: PlotWidget.setGraphYLimits
-.. automethod:: PlotWidget.setLimits
Axes
....
-The following methods handle the display properties of the axes:
+Those two methods give access to :class:`.items.Axis` which handle the limits, scales and labels of axis:
-.. automethod:: PlotWidget.isXAxisLogarithmic
-.. automethod:: PlotWidget.setXAxisLogarithmic
-.. automethod:: PlotWidget.isYAxisLogarithmic
-.. automethod:: PlotWidget.setYAxisLogarithmic
+.. automethod:: PlotWidget.getXAxis
+.. automethod:: PlotWidget.getYAxis
-.. automethod:: PlotWidget.isYAxisInverted
-.. automethod:: PlotWidget.setYAxisInverted
+The following methods handle plot limits, aspect ratio, grid and axes display:
+
+.. automethod:: PlotWidget.setLimits
.. automethod:: PlotWidget.isKeepDataAspectRatio
.. automethod:: PlotWidget.setKeepDataAspectRatio
.. automethod:: PlotWidget.getGraphGrid
.. automethod:: PlotWidget.setGraphGrid
+.. automethod:: PlotWidget.setAxesDisplayed
Reset zoom
..........
.. automethod:: PlotWidget.resetZoom
-Those methods change the behavior of :meth:`PlotWidget.resetZoom`.
+The following methods allow to add margins around the data when performing a zoom reset:
.. automethod:: PlotWidget.getDataMargins
.. automethod:: PlotWidget.setDataMargins
-.. automethod:: PlotWidget.isXAxisAutoScale
-.. automethod:: PlotWidget.setXAxisAutoScale
-.. automethod:: PlotWidget.isYAxisAutoScale
-.. automethod:: PlotWidget.setYAxisAutoScale
Defaults
........
@@ -130,10 +120,35 @@ of the plot and to toggle the use of a crosshair cursor:
.. automethod:: PlotWidget.getGraphCursor
.. automethod:: PlotWidget.setGraphCursor
+.. automethod:: PlotWidget.isPanWithArrowKeys
+.. automethod:: PlotWidget.setPanWithArrowKeys
+
+Coordinates conversion
+......................
+
+.. automethod:: PlotWidget.getDataRange
+.. automethod:: PlotWidget.getPlotBoundsInPixels
+.. automethod:: PlotWidget.dataToPixel
+.. automethod:: PlotWidget.pixelToData
+
+Active Item
+...........
+
+.. automethod:: PlotWidget.isActiveCurveHandling
+.. automethod:: PlotWidget.setActiveCurveHandling
+.. automethod:: PlotWidget.getActiveCurveColor
+.. automethod:: PlotWidget.setActiveCurveColor
+.. automethod:: PlotWidget.getActiveCurve
+.. automethod:: PlotWidget.setActiveCurve
+.. automethod:: PlotWidget.getActiveImage
+.. automethod:: PlotWidget.setActiveImage
+
Misc.
.....
+.. automethod:: PlotWidget.getWidgetHandle
.. automethod:: PlotWidget.saveGraph
+.. automethod:: PlotWidget.setDefaultBackend
Signals
.......
@@ -141,11 +156,6 @@ Signals
The :class:`PlotWidget` provides the following Qt signals:
.. autoattribute:: PlotWidget.sigPlotSignal
-.. autoattribute:: PlotWidget.sigSetYAxisInverted
-.. autoattribute:: PlotWidget.sigSetXAxisLogarithmic
-.. autoattribute:: PlotWidget.sigSetYAxisLogarithmic
-.. autoattribute:: PlotWidget.sigSetXAxisAutoScale
-.. autoattribute:: PlotWidget.sigSetYAxisAutoScale
.. autoattribute:: PlotWidget.sigSetKeepDataAspectRatio
.. autoattribute:: PlotWidget.sigSetGraphGrid
.. autoattribute:: PlotWidget.sigSetGraphCursor
@@ -153,21 +163,33 @@ The :class:`PlotWidget` provides the following Qt signals:
.. autoattribute:: PlotWidget.sigContentChanged
.. autoattribute:: PlotWidget.sigActiveCurveChanged
.. autoattribute:: PlotWidget.sigActiveImageChanged
+.. autoattribute:: PlotWidget.sigActiveScatterChanged
.. autoattribute:: PlotWidget.sigInteractiveModeChanged
-.. Not documented:
- addItem, removeItem, clearItems
- isActiveCurveHandling, enableActiveCurveHandling,
- getActiveCurveColor, setActiveCurveColor,
- getActiveCurve, setActiveCurve,
- isCurveHidden, hideCurve,
- getActiveImage, setActiveImage,
- getAllCurves, getCurve, getImage, getAllImages,
- getScatter, getHistogram,
- setDefaultPlotPoints, setDefaultPlotLines,
- getWidgetHandle, notify, setCallback, graphCallback,
- dataToPixel, pixelToData, getPlotBoundsInPixels,
- setGraphCursorShape, pickMarker, moveMarker, pickImageOrCurve, moveImage,
- onMousePress, onMouseMove, onMouseRelease, onMouseWheel,
- isDrawModeEnabled, setDrawModeEnabled, getDrawMode,
- isZoomModeEnabled, setZoomModeEnabled,
+.. PlotWidget public API that is not documented:
+ Could be added:
+ - addItem
+ - pan
+ - getLimitsHistory
+ - isDefaultPlotPoints
+ - isDefaultPlotLines
+ - setGraphCursorShape
+ - getAutoReplot, setAutoReplot, replot
+ Should not be added:
+ * Should be private:
+ - notify, setCallback, graphCallback
+ * Use remove instead:
+ - removeCurve, removeImage, removeItem, removeMarker
+ - clearCurves, clearImages, clearItems, clearMarkers
+ * Use items instead:
+ - isCurveHidden, hideCurve
+ * Use items.axis instead:
+ - getGraphXLimits, setGraphXLimits
+ - getGraphYLimits, setGraphYLimits
+ - getGraphXLabel, setGraphXLabel
+ - getGraphYLabel, setGraphYLabel
+ - isXAxisLogarithmic, setXAxisLogarithmic
+ - isYAxisLogarithmic, setXAxisLogarithmic
+ - isXAxisAutoScale, setXAxisAutoScale
+ - isYAxisAutoScale, setYAxisAutoScale
+ - setYAxisInverted, isYAxisInverted
diff --git a/doc/source/modules/gui/plot/printpreviewtoolbutton.rst b/doc/source/modules/gui/plot/printpreviewtoolbutton.rst
new file mode 100644
index 0000000..42b3832
--- /dev/null
+++ b/doc/source/modules/gui/plot/printpreviewtoolbutton.rst
@@ -0,0 +1,8 @@
+
+.. currentmodule:: silx.gui.plot
+
+:mod:`PrintPreviewToolButton`: Print preview buttons
+====================================================
+
+.. automodule:: silx.gui.plot.PrintPreviewToolButton
+ :members:
diff --git a/doc/source/modules/gui/plot/stackview.rst b/doc/source/modules/gui/plot/stackview.rst
index 7f2442a..11c7828 100644
--- a/doc/source/modules/gui/plot/stackview.rst
+++ b/doc/source/modules/gui/plot/stackview.rst
@@ -13,7 +13,9 @@
.. autoclass:: StackView
:members:
- :exclude-members: remove, setInteractiveMode, addItem
+ :exclude-members: remove, setInteractiveMode, addItem, getActiveImage,
+ resetZoom, setYAxisInverted, isYAxisInverted, getSupportedColormaps,
+ isKeepDataAspectRatio, setKeepDataAspectRatio
:class:`StackViewMainWindow` class
----------------------------------