|
1 | 1 | """ |
2 | 2 | ================= |
3 | | -Cross hair cursor |
| 3 | +Cross-hair cursor |
4 | 4 | ================= |
5 | 5 |
|
6 | | -This example adds a cross hair as a data cursor. The cross hair is |
| 6 | +This example adds a cross-hair as a data cursor. The cross-hair is |
7 | 7 | implemented as regular line objects that are updated on mouse move. |
8 | 8 |
|
9 | 9 | We show three implementations: |
10 | 10 |
|
11 | 11 | 1) A simple cursor implementation that redraws the figure on every mouse move. |
12 | | - This is a bit slow and you may notice some lag of the cross hair movement. |
| 12 | + This is a bit slow, and you may notice some lag of the cross-hair movement. |
13 | 13 | 2) A cursor that uses blitting for speedup of the rendering. |
14 | 14 | 3) A cursor that snaps to data points. |
15 | 15 |
|
@@ -76,18 +76,18 @@ def on_mouse_move(self, event): |
76 | 76 | # Faster redrawing using blitting |
77 | 77 | # """"""""""""""""""""""""""""""" |
78 | 78 | # This technique stores the rendered plot as a background image. Only the |
79 | | -# changed artists (cross hair lines and text) are rendered anew. They are |
| 79 | +# changed artists (cross-hair lines and text) are rendered anew. They are |
80 | 80 | # combined with the background using blitting. |
81 | 81 | # |
82 | 82 | # This technique is significantly faster. It requires a bit more setup because |
83 | | -# the background has to be stored without the cross hair lines (see |
| 83 | +# the background has to be stored without the cross-hair lines (see |
84 | 84 | # ``create_new_background()``). Additionally, a new background has to be |
85 | 85 | # created whenever the figure changes. This is achieved by connecting to the |
86 | 86 | # ``'draw_event'``. |
87 | 87 |
|
88 | 88 | class BlittedCursor: |
89 | 89 | """ |
90 | | - A cross hair cursor using blitting for faster redraw. |
| 90 | + A cross-hair cursor using blitting for faster redraw. |
91 | 91 | """ |
92 | 92 | def __init__(self, ax): |
93 | 93 | self.ax = ax |
@@ -167,7 +167,7 @@ def on_mouse_move(self, event): |
167 | 167 |
|
168 | 168 | class SnappingCursor: |
169 | 169 | """ |
170 | | - A cross hair cursor that snaps to the data point of a line, which is |
| 170 | + A cross-hair cursor that snaps to the data point of a line, which is |
171 | 171 | closest to the *x* position of the cursor. |
172 | 172 |
|
173 | 173 | For simplicity, this assumes that *x* values of the data are sorted. |
|
0 commit comments