matplotlib: backend_wx problems with co-ordinate systems?

Hi John,

I'm getting on reasonably well with the wxWindows back-end, and would be
nearly ready to release something for 'early adopters', but for one small

I can create figures with multiple sub-plots (I've tried most of the
examples on the web page), using colour and so on...

But all of my plotted values are inverted - that's to say, the origin of
each set of axes (from the point of view of plotting) is in the top left,
with increasing values going downwards.

The axis scales are correct, and all of the patches are in the right place.

I'm sure that I have my co-ordinate conversion mixed up somewhere, but to
understand what is happening, it would be useful to have a brief
explanation of the virtual co-ordinate system used internally in
matplotlib, and (especially) how internal co-ordinates should be converted
to device co-ordinates.

This is all quite confusing - I had originally assumed that I should be
subtracting the window client area height from all y axis co-ordinates,
but this really messes things up for multiple sub-plots (BTW, wxWindows
normally sets the origin in the 'natural' (i.e. bottom left) of a window.