How can I plot subplots on the same size?

2 次查看(过去 30 天)
Hi! I'm trying to plot a figure that can show both the interferogram and coherence of radar images and I did the following:
a = angle(Interferograms(n).Interferogram);
b = Coherence(n).Spatial;
figure;
subplot 221
pcolor(X,Y,a);
shading flat;
grid on;
axis equal;
xlim([xmin xmax]);
ylim([ymin ymax]);
set(gca,'Ydir','normal');
xlabel('x [m]');
ylabel('y [m]');
cb = colorbar;
Number = n;
title(['Interferogram ' num2str(Number)]);
subplot 222
pcolor(X,Y,b);
shading flat;
grid on;
axis equal;
xlim([xmin xmax]);
ylim([ymin ymax]);
set(gca, 'Ydir', 'normal');
xlabel('x [m]');
ylabel('y [m]');
caxis([0 1]);
axpos = get(gca, 'pos');
cb = colorbar;
set(gca,'pos',axpos);
Number = n;
title(['Coherence' num2str(Number)]);
When I plot the figure I get this result:
When I maximize the window, both plots look of the same size. How can I set the the plots to look of the same size without having to click the "maximize" tab on the top right corner?
Thank you!

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by