ipython/ipython — pull request #1152 by fperez (2011-12-14 08:48:16+00:00)
Title: Add support for displaying maptlotlib axes directly.

Currently, to display an Axes instance one must grab its .figure
attribute manually. Since there is no other reasonable representation
of an Axis than to show it, and so many matplotlib methods return
Axes, displaying them directly seems to be the most reasonable solution.

**Note** it's very late in the game and we're ready to release, so I want another pair of eyes on this one. The code is absolutely trivial, and I'm finding as I prepare some lecture notes that the inability to display an axis directly is really a drag. To see what I mean, try a notebook with these two cells before and after:

```
# cell 1
plot(rand(100))
ax = gca()

# cell 2
ax
```

It's annoying that matplotlib's various methods are kind of all over the map in what they return (figures, axes, line collections, etc). But since the axis is the basic object that does pretty much *all* the plotting in the matplotlib object hierarchy, I'm realizing it was an oversight not to display them as well as figures from the start.

As I said above, the code is trivial and I think it fixes an important oversight, but I do want a second look b/c we're more or less ready to go with 0.12.