Loading a .fig file in MATLAB without losing information

조회 수: 7 (최근 30일)
eddie
eddie 2024년 1월 24일
편집: KSSV 2024년 1월 24일
Hi everyone,
I hope you're all doing well. I have a question about loading *.fig files in MATLAB. When I use the openfig function, I notice that the figure is opened without any loss of information, preserving all its components, compared to using get on some children.
I'm interested in loading a file in the *.fig format and incorporating it into a figure, for instance, within a subplot, while ensuring that no information is lost. Could someone guide me on the best approach for achieving this?
Thank you in advance for your assistance!
Best regards,

채택된 답변

KSSV
KSSV 2024년 1월 24일
편집: KSSV 2024년 1월 24일
h1 = openfig('test1.fig','reuse'); % open existing/ saved figure
ax1 = gca; % get handle to axes of figure
h2 = figure; % create new figure
s1 = subplot(2,1,1); % create and get handle to the subplot axes
fig1 = get(ax1,'children'); % get handle to all the children in the figure
copyobj(fig1,s1); % copy children to new parent axes i.e. the subplot axes

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Title에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by