matplotlib/matplotlib — pull request #1145 by dmcdougall (2012-08-25 14:18:24+00:00)
Title: Fix formatter reset when twin{x,y}() is called

This addresses #1110. In particular.

The functions `Axes.twiny` and `Axes.twinx` create a new set of `Axes` objects. The `Axes.cla` method is called during the constructor to do some setup. If a shared axes is passed in, a copy of the `scale` is executed, which overwrites the current formatter. To fix it, I've stored in a temporary variable before the `scale` copy, then restore it to use the original formatter.