Clear Filters
Clear Filters

How can I plot subplots on the same size?

1 view (last 30 days)
Agustin
Agustin on 18 Sep 2017
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!

Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!