Can I improve the efficiency of space use while saving my figures?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jaime De La Mota Sanchis
am 13 Apr. 2022
Beantwortet: Voss
am 14 Apr. 2022
Hello everyone. I am currently using matlab to generate some figures. I am using the following code:
figure
subplot(3,1,1)
contourf(Y,X, stdRVTotal3D)
hold on
axesm mercator;
plot(coastlon,coastlat,'k', 'LineWidth', 1.5)
axis([-20 -10 23 32])
c2 = colorbar;
caxis([0, 2.8]);
xlabel('Longitude(^o)')
ylabel('Latitude(^o)')
title('4 RV')
subplot(3,1,2)
contourf(Y,X, stdRV3RV3D)
hold on
axesm mercator;
plot(coastlon,coastlat,'k', 'LineWidth', 1.5)
axis([-20 -10 23 32])
c2 = colorbar;
caxis([0, 2.8]);
xlabel('Longitude(^o)')
ylabel('Latitude(^o)')
title('3 RV')
subplot(3,1,3)
contourf(Y,X, stdRV2RV3D)
hold on
axesm mercator;
plot(coastlon,coastlat,'k', 'LineWidth', 1.5)
axis([-20 -10 23 32])
c2 = colorbar;
caxis([0, 2.8]);
xlabel('Longitude(^o)')
ylabel('Latitude(^o)')
title('2 RV')
sgtitle('STD wind velocity in the Y direction (m/s) nodes')
However, the resulting figure has a lot of empty space.
Can someone please give me some advice on how to get bigger subplots inside of the same figure?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/963530/image.jpeg)
Best regards.
Jaime.
0 Kommentare
Akzeptierte Antwort
Voss
am 14 Apr. 2022
You can try increasing the height of the figure, e.g., by dragging the edge of it, or by setting its Position in your code.
f1 = figure('Color','g');
make_subplots();
f2 = figure('Color','g','Position',[0 0 577 900]);
make_subplots();
f2 = figure('Color','g','Position',[0 0 577 1800]);
make_subplots();
function make_subplots()
subplot(3,1,1)
axesm mercator;
subplot(3,1,2)
axesm mercator;
subplot(3,1,3)
axesm mercator;
sgtitle('STD wind velocity in the Y direction (m/s) nodes')
end
0 Kommentare
Weitere Antworten (0)
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!