matplotlib.pyplot.
connect
(s, func)[source]¶
Connect event with string s to func. The signature of func is:
where event is a matplotlib.backend_bases.Event
. The following events are recognized
For the location events (button and key press/release), if the mouse is over the axes, the variable event.inaxes
will be set to the Axes
the event occurs is over, and additionally, the variables event.xdata
and event.ydata
will be defined. This is the mouse location in data coords. See KeyEvent
and MouseEvent
for more info.
Return value is a connection id that can be used with mpl_disconnect()
.
Examples
Usage:
def on_press(event): print('you pressed', event.button, event.xdata, event.ydata) cid = canvas.mpl_connect('button_press_event', on_press)
matplotlib.pyplot.connect
¶
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4