| 1 |
Examples |
| 2 |
-------- |
| 3 |
|
| 4 |
Using :class:`.PlotWidget` |
| 5 |
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 |
|
| 7 |
The following example shows how to use the :class:`.PlotWidget` class to create |
| 8 |
a simple plot with a curve and a filtering tool. In this example, the plot |
| 9 |
manager (see :class:`.PlotManager`) is not used, at least not directly: |
| 10 |
the plot manager is integrated in the :class:`.PlotWidget` class. |
| 11 |
|
| 12 |
.. literalinclude:: ../../../plotpy/tests/widgets/test_filtertest1.py |
| 13 |
:start-after: guitest: |
| 14 |
|
| 15 |
.. image:: ../../images/screenshots/filtertest1.png |
| 16 |
|
| 17 |
Using a plot manager |
| 18 |
^^^^^^^^^^^^^^^^^^^^ |
| 19 |
|
| 20 |
Even if this simple example does not justify the use of the :class:`.PlotManager` |
| 21 |
(this is an unnecessary complication here), it shows how to use it. In more complex |
| 22 |
applications, using the :class:`.PlotManager` allows to design highly versatile |
| 23 |
graphical user interfaces. |
| 24 |
|
| 25 |
.. literalinclude:: ../../../plotpy/tests/widgets/test_filtertest2.py |
| 26 |
:start-after: guitest: |
| 27 |
|
| 28 |
.. image:: ../../images/screenshots/filtertest2.png |