I have implemented something I'm calling "smart bounds" for the axis
spines, and have just committed it to svn r8048. I modified
examples/pylab_examples/spine_placement_demo.py to illustrate the basic
idea -- the spines and ticks should be able to automatically limit
themselves to the data range. There are some subtleties beyond that in
terms of the algorithmic details, but I think if you update from svn and
play around with the demo, especially by panning and zooming in the
figures, you'll get an idea of what I've done. I've attached two images
from such a session.
The key API addition is this:
Doing so turns on the smart bounds mode in the spine and the axis.
Anyhow, I'd be happy to receive any feedback on this new feature.