Eric Firing wrote:

Christopher Barker wrote:

Has anyone used MPL to make stick plots? If so, can I borrow your code?

If no one volunteers anything, then I suggest using quiver(..., headlength=0, headwidth=0, headaxislength=0), together with quiverkey(...). This will effectively give you a stick plot, with lots of flexibility.

Thanks, I was thinking that quiver() would get direction wrong, as the x and y scales are in totally different units, but it looks like that's not the case if you use the "angles" keyword:

angles: [‘uv’ | ‘xy’ | array]

With the default ‘uv’, the arrow aspect ratio is 1, so that if U*==*V the angle of the arrow on the plot is 45 degrees CCW from the x-axis. With ‘xy’, the arrow points from (x,y) to (x+u, y+v). Alternatively, arbitrary angles may be specified as an array of values in degrees, CCW from the x-axis.

> It could be implemented more efficiently in any of

several ways, but it would take work to do it well.

I hope I'll get time to do that, but I don't really like quiver stick plots anyway. I prefer plots (that I don't know the name of) that:

Time is on the x axis

Magnitude of the velocity is the x axis

At each data point, there is a dot, and the direction is given with a unit-length arrow originating at that dot, in the direction of the observation.

I wrote a version of this a while back with the old MPL transforms mechanism, but haven't taken the time to translate it.

-Chris

## ···

--

Christopher Barker, Ph.D.

Oceanographer

Emergency Response Division

NOAA/NOS/OR&R (206) 526-6959 voice

7600 Sand Point Way NE (206) 526-6329 fax

Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...