Skip to content

Commit 1ea6ed9

Browse files
committed
Slightly reorganized docs
1 parent 3aa2eb8 commit 1ea6ed9

File tree

16 files changed

+198
-83
lines changed

16 files changed

+198
-83
lines changed

doc/features/events.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. automodule:: plotpy.events

doc/features/index.rst

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,6 @@
11
Features
22
========
33

4-
A :mod:`plotpy`-based plotting widget may be constructed using one of the following
5-
methods:
6-
7-
* *Interactive mode*: when manipulating and visualizing data in an interactive
8-
Python or IPython interpreter, the :py:mod`.pyplot` module provide
9-
the easiest way to plot curves, show images and more. Syntax is similar
10-
to MATLAB's, thus very easy to learn and to use interactively.
11-
12-
* *Script mode*: when manipulating and visualizing data using a script, the
13-
:py:mod`.pyplot` module is still a good choice as long as you don't
14-
need to customize the figure graphical user interface (GUI) layout.
15-
However, if you want to add other widgets to the GUI, like menus, buttons
16-
and so on, you should rather use plotting widget classes instead of
17-
the `pyplot` helper functions.
18-
19-
There are two kinds of plotting widgets defined in :mod:`plotpy`:
20-
21-
* low-level plotting widget: :py:class:`.plot.base.BasePlot`
22-
23-
* high-level plotting widgets (ready-to-use widgets with integrated tools
24-
and panels): :py:class:`.plot.PlotWidget` and corresponding dialog box
25-
:py:class:`.plot.PlotDialog` and window
26-
:py:class:`.plot.PlotWindow`
27-
28-
Plot widgets with integrated plot manager:
29-
30-
.. image:: ../images/plot_widgets.png
31-
32-
.. seealso::
33-
34-
:ref:`items`
35-
Plot items: curves, images, markers, etc.
36-
37-
:ref:`plot`
38-
Ready-to-use curve and image plotting widgets and dialog boxes
39-
40-
414
.. toctree::
425
:maxdepth: 2
436
:caption: Contents:
@@ -58,3 +21,4 @@ Plot widgets with integrated plot manager:
5821
io
5922
signals
6023
mathutils/index
24+
events

doc/features/items/reference.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:tocdepth: 3
2+
13
Reference
24
---------
35

doc/features/panels/reference.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:tocdepth: 3
2+
13
Reference
24
---------
35

doc/features/plot/index.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,42 @@
33
Plot widgets
44
============
55

6+
A :mod:`plotpy`-based plotting widget may be constructed using one of the following
7+
methods:
8+
9+
* *Interactive mode*: when manipulating and visualizing data in an interactive
10+
Python or IPython interpreter, the :py:mod`.pyplot` module provide
11+
the easiest way to plot curves, show images and more. Syntax is similar
12+
to MATLAB's, thus very easy to learn and to use interactively.
13+
14+
* *Script mode*: when manipulating and visualizing data using a script, the
15+
:py:mod`.pyplot` module is still a good choice as long as you don't
16+
need to customize the figure graphical user interface (GUI) layout.
17+
However, if you want to add other widgets to the GUI, like menus, buttons
18+
and so on, you should rather use plotting widget classes instead of
19+
the `pyplot` helper functions.
20+
21+
There are two kinds of plotting widgets defined in :mod:`plotpy`:
22+
23+
* low-level plotting widget: :py:class:`.plot.base.BasePlot`
24+
25+
* high-level plotting widgets (ready-to-use widgets with integrated tools
26+
and panels): :py:class:`.plot.PlotWidget` and corresponding dialog box
27+
:py:class:`.plot.PlotDialog` and window
28+
:py:class:`.plot.PlotWindow`
29+
30+
Plot widgets with integrated plot manager:
31+
32+
.. image:: ../../images/plot_widgets.png
33+
34+
.. seealso::
35+
36+
:ref:`items`
37+
Plot items: curves, images, markers, etc.
38+
39+
:ref:`plot`
40+
Ready-to-use curve and image plotting widgets and dialog boxes
41+
642
.. toctree::
743
:maxdepth: 2
844
:caption: Contents:

doc/features/plot/reference.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:tocdepth: 3
2+
13
Reference
24
---------
35

doc/features/styles/reference.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:tocdepth: 3
2+
13
Reference
24
---------
35

doc/features/tools/reference.rst

Lines changed: 74 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,67 @@
1+
:tocdepth: 3
2+
13
Reference
24
---------
35

4-
.. autoclass:: plotpy.tools.GuiTool
6+
Base classes
7+
^^^^^^^^^^^^
8+
9+
.. autoclass:: plotpy.tools.base.GuiTool
510
:members:
6-
.. autoclass:: plotpy.tools.GuiToolT
11+
.. autoclass:: plotpy.tools.base.GuiToolT
712
:members:
813
.. autoclass:: plotpy.tools.InteractiveTool
914
:members:
1015
.. autoclass:: plotpy.tools.CommandTool
1116
:members:
1217
.. autoclass:: plotpy.tools.ActionTool
1318
:members:
14-
.. autoclass:: plotpy.tools.RectZoomTool
19+
.. autoclass:: plotpy.tools.PanelTool
1520
:members:
21+
22+
Selection tools
23+
^^^^^^^^^^^^^^^
24+
1625
.. autoclass:: plotpy.tools.SelectTool
1726
:members:
1827
.. autoclass:: plotpy.tools.SelectPointTool
1928
:members:
20-
.. autoclass:: plotpy.tools.RotationCenterTool
29+
30+
Plot tools
31+
^^^^^^^^^^
32+
33+
.. autoclass:: plotpy.tools.DoAutoscaleTool
34+
:members:
35+
.. autoclass:: plotpy.tools.DisplayCoordsTool
2136
:members:
37+
.. autoclass:: plotpy.tools.RectZoomTool
38+
:members:
39+
.. autoclass:: plotpy.tools.DummySeparatorTool
40+
:members:
41+
.. autoclass:: plotpy.tools.RectangularSelectionTool
42+
:members:
43+
44+
Item tools
45+
^^^^^^^^^^
46+
47+
.. autoclass:: plotpy.tools.ItemListPanelTool
48+
:members:
49+
.. autoclass:: plotpy.tools.SaveItemsTool
50+
:members:
51+
.. autoclass:: plotpy.tools.LoadItemsTool
52+
:members:
53+
.. autoclass:: plotpy.tools.ExportItemDataTool
54+
:members:
55+
.. autoclass:: plotpy.tools.EditItemDataTool
56+
:members:
57+
.. autoclass:: plotpy.tools.ItemCenterTool
58+
:members:
59+
.. autoclass:: plotpy.tools.DeleteItemTool
60+
:members:
61+
62+
Shape tools
63+
^^^^^^^^^^^
64+
2265
.. autoclass:: plotpy.tools.MultiLineTool
2366
:members:
2467
.. autoclass:: plotpy.tools.FreeFormTool
@@ -37,8 +80,6 @@ Reference
3780
:members:
3881
.. autoclass:: plotpy.tools.EllipseTool
3982
:members:
40-
.. autoclass:: plotpy.tools.PlaceAxesTool
41-
:members:
4283
.. autoclass:: plotpy.tools.AnnotatedRectangleTool
4384
:members:
4485
.. autoclass:: plotpy.tools.AnnotatedCircleTool
@@ -51,22 +92,16 @@ Reference
5192
:members:
5293
.. autoclass:: plotpy.tools.HRangeTool
5394
:members:
54-
.. autoclass:: plotpy.tools.DummySeparatorTool
55-
:members:
56-
.. autoclass:: plotpy.tools.AntiAliasingTool
57-
:members:
58-
.. autoclass:: plotpy.tools.DownSamplingTool
59-
:members:
60-
.. autoclass:: plotpy.tools.DisplayCoordsTool
95+
96+
Image tools
97+
^^^^^^^^^^^
98+
99+
.. autoclass:: plotpy.tools.RotationCenterTool
61100
:members:
62101
.. autoclass:: plotpy.tools.ReverseYAxisTool
63102
:members:
64103
.. autoclass:: plotpy.tools.AspectRatioTool
65104
:members:
66-
.. autoclass:: plotpy.tools.PanelTool
67-
:members:
68-
.. autoclass:: plotpy.tools.ItemListPanelTool
69-
:members:
70105
.. autoclass:: plotpy.tools.ContrastPanelTool
71106
:members:
72107
.. autoclass:: plotpy.tools.ColormapTool
@@ -81,6 +116,28 @@ Reference
81116
:members:
82117
.. autoclass:: plotpy.tools.LineCrossSectionTool
83118
:members:
119+
.. autoclass:: plotpy.tools.ImageMaskTool
120+
:members:
121+
122+
Curve tools
123+
^^^^^^^^^^^
124+
125+
.. autoclass:: plotpy.tools.AntiAliasingTool
126+
:members:
127+
.. autoclass:: plotpy.tools.DownSamplingTool
128+
:members:
129+
130+
Axes tools
131+
^^^^^^^^^^
132+
133+
.. autoclass:: plotpy.tools.AxisScaleTool
134+
:members:
135+
.. autoclass:: plotpy.tools.PlaceAxesTool
136+
:members:
137+
138+
Miscellaneous tools
139+
^^^^^^^^^^^^^^^^^^^
140+
84141
.. autoclass:: plotpy.tools.SaveAsTool
85142
:members:
86143
.. autoclass:: plotpy.tools.CopyToClipboardTool
@@ -93,21 +150,5 @@ Reference
93150
:members:
94151
.. autoclass:: plotpy.tools.PrintTool
95152
:members:
96-
.. autoclass:: plotpy.tools.SaveItemsTool
97-
:members:
98-
.. autoclass:: plotpy.tools.LoadItemsTool
99-
:members:
100-
.. autoclass:: plotpy.tools.AxisScaleTool
101-
:members:
102153
.. autoclass:: plotpy.tools.HelpTool
103154
:members:
104-
.. autoclass:: plotpy.tools.ExportItemDataTool
105-
:members:
106-
.. autoclass:: plotpy.tools.EditItemDataTool
107-
:members:
108-
.. autoclass:: plotpy.tools.ItemCenterTool
109-
:members:
110-
.. autoclass:: plotpy.tools.DeleteItemTool
111-
:members:
112-
.. autoclass:: plotpy.tools.ImageMaskTool
113-
:members:

plotpy/events.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,75 @@
1111
Event handling
1212
--------------
1313
14+
Overview
15+
^^^^^^^^
16+
1417
The :mod:`plotpy.events` module provides classes to handle events on a
1518
:class:`plotpy.plot.PlotWidget`.
19+
20+
The following classes are available:
21+
22+
* :class:`.StatefulEventFilter`: stateful event filter
23+
* :class:`.KeyEventMatch`: key event match
24+
* :class:`.StandardKeyMatch`: standard key event match
25+
* :class:`.MouseEventMatch`: mouse event match
26+
* :class:`.GestureEventMatch`: gesture event match
27+
* :class:`.DragHandler`: drag handler
28+
* :class:`.ClickHandler`: click handler
29+
* :class:`.PanHandler`: pan handler
30+
* :class:`.ZoomHandler`: zoom handler
31+
* :class:`.GestureHandler`: gesture handler
32+
* :class:`.PinchPanGestureHandler`: pinch and pan gesture handler
33+
* :class:`.MenuHandler`: menu handler
34+
* :class:`.QtDragHandler`: Qt drag handler
35+
* :class:`.AutoZoomHandler`: auto zoom handler
36+
* :class:`.MoveHandler`: move handler
37+
* :class:`.ObjectHandler`: object handler
38+
* :class:`.RectangularSelectionHandler`: rectangular selection handler
39+
* :class:`.PointSelectionHandler`: point selection handler
40+
* :class:`.ZoomRectHandler`: zoom rectangle handler
41+
42+
Reference
43+
^^^^^^^^^
44+
45+
.. autoclass:: StatefulEventFilter
46+
:members:
47+
.. autoclass:: KeyEventMatch
48+
:members:
49+
.. autoclass:: StandardKeyMatch
50+
:members:
51+
.. autoclass:: MouseEventMatch
52+
:members:
53+
.. autoclass:: GestureEventMatch
54+
:members:
55+
.. autoclass:: DragHandler
56+
:members:
57+
.. autoclass:: ClickHandler
58+
:members:
59+
.. autoclass:: PanHandler
60+
:members:
61+
.. autoclass:: ZoomHandler
62+
:members:
63+
.. autoclass:: GestureHandler
64+
:members:
65+
.. autoclass:: PinchPanGestureHandler
66+
:members:
67+
.. autoclass:: MenuHandler
68+
:members:
69+
.. autoclass:: QtDragHandler
70+
:members:
71+
.. autoclass:: AutoZoomHandler
72+
:members:
73+
.. autoclass:: MoveHandler
74+
:members:
75+
.. autoclass:: ObjectHandler
76+
:members:
77+
.. autoclass:: RectangularSelectionHandler
78+
:members:
79+
.. autoclass:: PointSelectionHandler
80+
:members:
81+
.. autoclass:: ZoomRectHandler
82+
:members:
1683
"""
1784

1885
from __future__ import annotations

plotpy/plot/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
XCrossSection,
6969
YCrossSection,
7070
)
71-
from plotpy.tools import GuiTool, GuiToolT
71+
from plotpy.tools.base import GuiTool, GuiToolT
7272

7373

7474
class DefaultPlotID:

0 commit comments

Comments
 (0)