O'Reilly logo

Interactive Applications Using Matplotlib by Benjamin V. Root

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Editor events

Let's now re-imagine our existing features as a set of events:

  • Change frame
  • Select storm
  • Deselect storm
  • Hide storm cells
  • Delete storm cell
  • Save storm data
  • Display help

We will add two new methods to the ControlSys class: _connect() and _emit(). They are merely shorthand for the mpl_connect() command and the recently introduced process() method. In the constructor, we will connect some methods to the events we have just listed. In the case of the help method and the storm saving method, the methods originally supplied to the keymap will be connected to these two new events, and the keymap will instead merely call _emit() of the respective events. This can give a taste of fully customizable keymaps in the future. Meanwhile, this is what our ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required