|
4 | 4 | Event handling and picking |
5 | 5 | ************************** |
6 | 6 |
|
7 | | -matplotlib works with a number of user interface toolkits (wxpython, |
| 7 | +Matplotlib works with a number of user interface toolkits (wxpython, |
8 | 8 | tkinter, qt4, gtk, and macosx) and in order to support features like |
9 | 9 | interactive panning and zooming of figures, it is helpful to the |
10 | 10 | developers to have an API for interacting with the figure via key |
@@ -47,14 +47,16 @@ disconnect the callback, just call:: |
47 | 47 | fig.canvas.mpl_disconnect(cid) |
48 | 48 |
|
49 | 49 | .. note:: |
50 | | - The canvas retains only weak references to the callbacks. Therefore |
51 | | - if a callback is a method of a class instance, you need to retain |
52 | | - a reference to that instance. Otherwise the instance will be |
53 | | - garbage-collected and the callback will vanish. |
| 50 | + The canvas retains only weak references to instance methods used as |
| 51 | + callbacks. Therefore, you need to retain a reference to instances owning |
| 52 | + such methods. Otherwise the instance will be garbage-collected and the |
| 53 | + callback will vanish. |
| 54 | + |
| 55 | + This does not affect free functions used as callbacks. |
54 | 56 |
|
55 | 57 |
|
56 | 58 | Here are the events that you can connect to, the class instances that |
57 | | -are sent back to you when the event occurs, and the event descriptions |
| 59 | +are sent back to you when the event occurs, and the event descriptions: |
58 | 60 |
|
59 | 61 |
|
60 | 62 | ======================= ============================================================================================= |
|
0 commit comments