How can I change the distance between figures in subplot?
20 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear All,
I created a subplot figure with the following code:
subplot(2,2,1);
axesm('lambert','maplatlimit',[ 26.5861 71.8699],'maplonlimit',[-34.748 60.8422]);
>> pcolorm(lat,lon,IU1);
set(gca,'box','off')
set(gca,'visible','off')
set(gcf,'resize','on');
>> colormap(C);
subplot(2,2,2);
axesm('lambert','maplatlimit',[ 26.5861 71.8699],'maplonlimit',[-34.748 60.8422]);
>> pcolorm(lat,lon,IU2);
set(gca,'box','off')
set(gca,'visible','off')
set(gcf,'resize','on');
>> colormap(C);
subplot(2,2,3);
axesm('lambert','maplatlimit',[ 26.5861 71.8699],'maplonlimit',[-34.748 60.8422]);
>> pcolorm(lat,lon,IU3);
set(gca,'box','off')
set(gca,'visible','off')
set(gcf,'resize','on');
>> colormap(C);
subplot(2,2,4);
axesm('lambert','maplatlimit',[ 26.5861 71.8699],'maplonlimit',[-34.748 60.8422]);
>> pcolorm(lat,lon,IU4);
set(gca,'box','off')
set(gca,'visible','off')
set(gcf,'resize','on');
>> colormap(C);
hp4 = get(subplot(2,2,4),'Position')
>> h=colorbar;
set(h, 'Position', [hp4(1)+hp4(3)+0.02 hp4(2) 0.01 hp4(2)+hp4(3)*2.1],'YTickMode', 'manual', 'YTick',[1,2,3,4,5], 'YTickLabelMode', 'manual', 'YTickLabel', {'Hiper-arid', 'Arid', 'Semi-arid', 'Sub-humid', 'Humid'},'FontSize',12, 'FontWeight', 'bold');
I delted the box with
set(gca,'box','off')
because the Lambert projection created a too big box compare to the figure. In the resulted figure (is attached)the distance between subplot(2,2,1) and subplot(2,2,2) is too large. Could someone suggest me a solution for mitigate the distance? Thank you for your help in advance!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!