preliminary detachable axis patch

Hi mplibbies,

I've made a preliminary stab at implementing detachable axis spines, and I include a set of patches here. This is not in a state ready for prime-time yet, but is presented here only as a report of progress. The biggest question I see is whether now would be a good time to jump to a Traits-like mechanism. Things are getting pretty messy in the axis.draw() method, and I've really only implemented a fraction of what's really desired. For example, I've hand-coded propagation of the axis spine's location to the origin of the ticks, but I haven't continued down the chain to the tick labels or the axis label. Although I haven't played around with Traits, my feeling is that this sort of daisy-chained dependency could be much more easily handled with them.

To get this ready for prime time in its current form (without going to what I imagine Traits to be), I think it would be a simple but tedious and error-prone effort to propagate display coordinates down the spine->ticks->ticklabels->axislabel chain in the event of something like "gca().xaxis.spineBottomPad=10". I think I could bite this off in the next few days for inclusion into CVS, although I'd be the first to agree that it doesn't appear to be the ideal solution that something based on Traits does.

So... any takers at performing open-heart surgery on matplotlib and replacing several of the most critical parts with (Trait-based) replacements? (C'mon, John, this should be easy for neuro-surgery types! :slight_smile: Or should I press ahead with the dumb version? ("If you're gonna be dumb, you gotta be tough")

Any other comments/questions?


prelim-detach-axis.patch.gz (5.26 KB)