在Python底图中绘制曲线
我想在底图地图上绘制曲线/弧线。 我可以使用 map.plot(x,y,..) 绘制一条直线,但如何使其弯曲/有箭头?
在 matplotlib 中,可以使用 annotate(..) 来完成此操作,但 Basemap 没有此方法。
有什么想法吗?
I would like to plot curved/arced lines on a Basemap map.
I can plot a straight line using map.plot(x,y,..), but how do I make it curved/have arrows?
In matplotlib, this can be done using annotate(..), but Basemap doesn't have this method.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个非常古老的问题,但我认为无论如何回答一下可能会很好。当你说曲线时,我假设你的意思是画一个大圆。在 底图文档 中有一个完全做到这一点的示例,我有修改为更容易自己修改:
请注意,大圆方法无法处理 的交叉地图的边缘(如文档中所述< /a>),虽然有明确的记录,但恕我直言,这是一个相当大的缺陷。
希望对某人有帮助,
This is a very old question, but I thought it might be good to answer anyway. When you said curved lines, I assumed you meant drawing a great circle. There is an example of doing exactly that in the basemap documentation, which I have modified to make a little more easy to modify yourself:
Note that the great circle method cannot handle the crossing of the edges of the map (as mentioned in the documentation), which, although clearly documented, is a pretty major flaw IMHO.
Hope that helps somebody,