Extract coordinate data from plotm figure?
22 次查看(过去 30 天)
显示 更早的评论
Hello, I made a map from latitude (X), longitude (Y), and elevation (Z) data. Unfortunately, I can't find the original data that I used. However I do have the matlab figure. How can I extract the X, Y, and Z data from the Matlab fig file?
Attached is the matlab fig file I would like to extract the data from.
0 个评论
采纳的回答
DGM
2021-8-29
Something like this:
F = openfig('sample_map.fig');
h = findobj(F,'type','surface');
x=get(h,'xdata');
y=get(h,'ydata');
z=get(h,'zdata');
That's assuming you're after the surface plot data. If there are other objects in the axes which have data you need, you'll have to find them too.
2 个评论
Walter Roberson
2021-8-29
F = openfig('sample_map.fig');
h = findobj(F,'type','surface');
x=get(h,'xdata');
y=get(h,'ydata');
z=get(h,'cdata');
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!