How doyou draw in pixel or lenght units?

Rich Shepard wrote:

  Have you looked at PSTricks?

I haven't looked at that for ages. I need this in a wxPython app, as well as other formats, so MPL only would be nice.

I know that it can draw this type of plot from real data in a file, and I suspect that once you define the arrows as going
from one point to another, that's how they'll stay. If the spacing between
those points varies with the size of the image, I don't know of any
application that will automatically recalculate each vector and keep it a
fixed length.

actually, it's the other way around in a way: the application has to re-calculate the data to make the length change. After all the actual drawing happens in pixel coordinates.

All the 2D drawing/plotting programs I've used (e.g., Gri,
tgif, jpicedt, PSTricks, ipe)

Yes and no. In MPL, and others, some things are fixed: text size, markers, etc. In this case, what I want is really like a marker, except that each marker needs to be rotated differently.

The PNG I enclosed was generated with my wxPython FloatCanvas. I designed that to present data graphically in arbitrary coordinates, and it felt very natural to have objects that done' scale as you zoom: text, dots, bitmaps, line widths, etc, etc. I also have scalable objects.

However, I haven't written code to handle axes, etc, so I prefer to use MPL for traditional plotting.

Hugo Gamboa wrote:

I'm quite new to matplotlib, and I had a problem with zooming, and I
solved it by catching the draw event, obtain the new axis, recalculate
the data and presenting it again.

I was afraid I'd have to do that. Do you have some fairly simple sample code, that would help some.

I'm also going to dig into how markers are done. maybe I can leverage that somehow. What I'm hoping to find is a way to define a new patch or something, that can draw in pixel (or pt) units at a location in axes coordinates. Maybe I'm just stuck thinking about it in that way because of how I've written my code, but it seems useful.

I'd be interested in what John thinks about this:

-- is there an easy way to do this?
-- If not, do you thing it would be worth adding?

Are you reading, John?

thanks,
-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...