Subplot graph by combining two obtained graphs.
显示 更早的评论
I have two figures now i want to combine these two figures in subplot way.
回答(1 个)
KSSV
2022-4-11
h1 = openfig('Flow_rate_clot_M.fig','reuse'); % open figure
ax1 = gca; % get handle to axes of figure
h2 = openfig('Flow_rate_clot_n.fig','reuse');
ax2 = gca;
h3 = figure; %create new figure
s1 = subplot(2,1,1); %create and get handle to the subplot axes
s2 = subplot(2,1,2);
fig1 = get(ax1,'children'); %get handle to all the children in the figure
fig2 = get(ax2,'children');
copyobj(fig1,s1); %copy children to new parent axes i.e. the subplot axes
copyobj(fig2,s2);
类别
在 帮助中心 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!