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
|
Examples
--------
Using :class:`.PlotWidget`
^^^^^^^^^^^^^^^^^^^^^^^^^^
The following example shows how to use the :class:`.PlotWidget` class to create
a simple plot with a curve and a filtering tool. In this example, the plot
manager (see :class:`.PlotManager`) is not used, at least not directly:
the plot manager is integrated in the :class:`.PlotWidget` class.
.. literalinclude:: ../../../plotpy/tests/widgets/test_filtertest1.py
:start-after: guitest:
.. image:: ../../images/screenshots/filtertest1.png
Using a plot manager
^^^^^^^^^^^^^^^^^^^^
Even if this simple example does not justify the use of the :class:`.PlotManager`
(this is an unnecessary complication here), it shows how to use it. In more complex
applications, using the :class:`.PlotManager` allows to design highly versatile
graphical user interfaces.
.. literalinclude:: ../../../plotpy/tests/widgets/test_filtertest2.py
:start-after: guitest:
.. image:: ../../images/screenshots/filtertest2.png
|