How do I extract surface plot data from a figure?

조회 수: 7 (최근 30일)
Larkin
Larkin 2013년 11월 28일
답변: kjetil87 2013년 11월 28일
Hello,
I would like to find out hot to obtain surface plot data from a figure. I plotted data using,
surf(X,Y,Z);
I then saved the file as a figure.
Subssequently, I would like to find out how I can extract the X,Y,Z from the figure (not through the surf object)
Thanks.

답변 (1개)

kjetil87
kjetil87 2013년 11월 28일
x=1:5;
y=1:5;
z=randn(5,5);
fprintf('z was : \n');
disp(z);
figure;surf(x,y,z);
clear all
ch=get(gca,'ch');
x=get(ch,'xd');
y=get(ch,'yd');
z=get(ch,'zd');
fprintf('z is now;\n');
disp(z);

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by