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

2 次查看(过去 30 天)
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 个)

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by