필터 지우기
필터 지우기

How to convert Matlab figures into subplots without having to redraw the plots again in the command window?

조회 수: 6 (최근 30일)
hello
I have a number of Matlab figures that I want to convert to subplots without having to redraw the figures in the command window . I know there is a function called subplot and tilelayout, is there a way that a Matlab figure can be converted by copying the axis of each figure into the respective tile within the tiled layout ?

채택된 답변

Paul
Paul 2024년 4월 7일
Use copyobj to copy the axes of interest to a new figure, then arrange with subplot
figure
plot(rand(3))
ax0 = gca;
hnew = figure;
ax1 = copyobj(ax0,hnew);
subplot(3,1,1,ax1)
% show that we can copy another axes into the same figure.
ax3 = copyobj(ax0,hnew);
subplot(3,1,3,ax3);

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by