(映射工具箱)地图轴xdata,ydata和zdata的意思是?
8次观看(最近30天)
显示较旧的评论
你好,
我正在使用plot3m来绘制地理位置:
hplot = plot3m(lat,lon,h)
但是要更新地图中的图,它需要XDATA,YDATA,ZDATA
不幸的是,在映射工具箱中没有关于这些字段的协调的任何文档?
我如何在LAT,LON,H:
set(hplot,'xdata',xdata,'ydata',ydata,'zdata',zdata)
提前致谢。
阿布布
0评论
接受的答案
凯利·科尔尼(Kelly Kearney)
2019年9月5日
Edited:凯利·科尔尼(Kelly Kearney)
2019年9月5日
地图轴应用地理变换,将地理坐标转换为地图轴使用的投影。您可以使用MFWDTran手动执行此转换:
ax = worldmap('world');
lat = [0 45];
lon = [0 45];
hln = plotm(lat,lon,'-ro');
%将行的X/YDATA与手动转换数据进行比较
hln.xdata
hln.YData
[x,y] = mfwdtran(lat, lon)
%您应该看到的结果...
ans =
0 3.8059E+06
ans =
0 4.7997E+06
x =
0 3.8059E+06
y =
0 4.7997E+06
To go the opposite direction (i.e. convert from projected x/y to lat/lon, use minvtran).
更多答案(1)
DPB
on 31 Aug 2019
The map is still an axes underneath the hood so the internal property names are the same. But, the property name is just a name, the data are what are associated with the particular axis direction...just use
set(hplot,'xdata',拉特,'ydata',朗,'zdata',h)
2条评论
DPB
on 4 Sep 2019
我没有映射结核病,所以除了阅读文档之外,做不做更多的事情...
你使用过吗?
hold on
在尝试将更多图添加到现有图中之前?
提交支持请求以万博1manbetx支持如果没有结束,请支持...