Can I improve the efficiency of space use while saving my figures?

3 ビュー (過去 30 日間)
Jaime De La Mota Sanchis
Jaime De La Mota Sanchis 2022 年 4 月 13 日
回答済み: Voss 2022 年 4 月 14 日
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?
Best regards.
Jaime.

採用された回答

Voss
Voss 2022 年 4 月 14 日
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 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by