IDL:我可以获得绘图笛卡尔平面上某个点的坐标吗?
我有一个这样的情节: https://i.sstatic.net/zdike.png
我需要点的数据坐标以图风刺。
现在,如果我想在 x=100、y=20 处绘制风倒钩,有没有办法获得绘图的该(或其他)点的数据坐标?
I have a plot like this:
https://i.sstatic.net/zdike.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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ARROW
过程对您有用吗?看起来你可以只需向其传递箭头底部的数据坐标 (
x0=100, y0=20
),另一组坐标 x1 和 y1 表示箭头末端的长度和方向。它应该负责在您的绘图上正确放置和缩放它们。
但我不认为
ARROW
可以让您对箭头样式进行任何控制,除了颜色之外,线条的粗细,以及填充与未填充的对比。如果您需要使用不同的
形状,我认为你可能必须将其表示为 XY 点数组来定义
自定义箭头符号的顶点,然后旋转、缩放、平移和
PLOTS
每个符号顶点之间的线段。
DATA
和DEVICE
图形关键字告诉各种绘图例程是否坐标是数据坐标或设备坐标。我不确定从
您的描述是适当的设置,但其中之一应该满足您的要求。
Would the
ARROW
procedure be of any use to you? It looks like you couldjust 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
andDEVICE
graphics keywords tell the various plotting routines whetherthe 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.