jakevdp/mpld3 — pull request #204 by quaquel (2014-05-24 08:51:38+00:00)
Title: Twinx twiny bugfix

This adresses #188. It depends on the latest version of mplexporter. An additional test_twinxy has been added to test_plots. Both the zoom and box zoom plugin work and update both axes. See test_twinxy for details.

To make zoom and box zoom work, a variety of changes were needed on the javascript side. See axes.js for details.

The current version works but is not necessarily the most elegant solution. This is caused at least in part by how twinx/twiny is implemented in matplotlib. The current version relies on sharex and sharey to propagate zooming. A better solution might be to let each axes check if there are other axes that have the same position. If an axes has the same position, try and remove it from either sharex or sharey and propagate events separately for such twin axes.