views:

25

answers:

1

I have a plot like this: http://i.imgur.com/i9xp5.png

I need the data coordinates of points in order to plot wind barbs.

Now, if I wanted a wind barb to be drawn at x=100, y=20, is there a way I can obtain the data coordinates of that ( or other ) points of my plot?

A: 

Would the ARROW procedure be of any use to you? It looks like you could just pass it your data coordinates (x0=100, y0=20) for the base of the arrow, and another set of coordinates x1 and y1 representing the length and direction for the arrowhead end. It should take care of placing and scaling them properly on your plot.

But I don't think ARROW gives you any control over the arrow style, except for color, heaviness of the lines, and filled vs. unfilled. If you need to use a different shape, I think you might have to express it as an array of XY points to define the vertices of your custom arrow symbol, then rotate, scale, translate, and PLOTS line segments between each symbol vertex.

The DATA and DEVICE graphics keywords tell the various plotting routines whether the coordinates are in data coordinates or device coordinates. I'm not sure from your description which is the appropriate setting, but one of them should do what you want.

Jim Lewis
Thanks, for some reason I couldn't wrap my head around data coordinates.
Carthage