You are reading an old version of the documentation (v3.1.0). For the latest version see https://matplotlib.org/stable/api/prev_api_changes/api_changes_0.61.html
Version 3.1.0
matplotlib
Fork me on GitHub

Changes for 0.61ΒΆ

canvas.connect is now deprecated for event handling.  use
mpl_connect and mpl_disconnect instead.  The callback signature is
func(event) rather than func(widget, event)