November 2018
Beginner to intermediate
214 pages
5h 2m
English
Next, we must capture the return value by inserting plt.gcf ( ) .canvas.mpl_disconnect (cid) to remove the event handler. Therefore, by adding this function, we can click to draw a circle.
However, subsequent clicks will not perform anything as the event handler has been removed:

As we can see, the mouse isn't the only thing that can capture events. We can also capture events for key presses. By using the canvas.mpl_connect command and passing the first argument as key_press _event (the first argument is a string describing which event to capture and the second argument is the callback function), we generate ...
Read now
Unlock full access