从图片中提取数据
h1 = open(figure_name);
h=get(gca,'Children');
data = get(h,'Cdata');
x = get(h,'Xdata');
y = get(h,'Ydata');
% close all
map = get(h1,'Colormap');
xL = get(gca,'Xlim');
yL = get(gca,'Ylim');
% close all
h2 = figure;
image(x,y, data,'CDataMapping','scaled');
h2.Colormap = map;
axis equal
xlim(xL);
ylim(yL);
参考
https://blog.youkuaiyun.com/yangziluomu/article/details/39520771
https://blog.youkuaiyun.com/yangziluomu/article/details/39520771