Bug report
If fig.canvas.mpl_connect is passed an invalid event type string, it silently does nothing. I think there should at least be a warning (maybe an error?)
Code for reproduction
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
def onclick(event):
print('Event!')
cid = fig.canvas.mpl_connect('invalid_event_string', onclick)
plt.show()
Actual outcome
Clicking around or doing or trying to trigger onclick() does nothing.
Expected outcome
I would expect a warning if 'invalid_event_string' isn't one of the strings listed at http://matplotlib.org/devdocs/api/backend_bases_api.html?highlight=mpl_connect#matplotlib.backend_bases.FigureCanvasBase.mpl_connect
Matplotlib version
- Matplotlib Version: master installed from source using pip