How can I plot subplots on the same size?
2 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Subplots 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!