ipython/ipython — pull request #4230 by fperez (2013-09-19 02:58:12+00:00)
Title: Switch correctly to the user's default matplotlib backend after inline.

If '%matplotlib inline' was called first, we'd incorrectly revert to
inline when plain '%matplotlib' was called, instead of loading the
user's default GUI. If the user called '%matplotlib' first (without
'inline') it worked correctly, but not in the other order.

The fix is to read the backend from the original defaults, not from
the runtime data structure.