필터 지우기
필터 지우기

Question about cropping white space in plot

조회 수: 1 (최근 30일)
Jaime  de la Mota
Jaime de la Mota 2019년 6월 6일
Hello everyone.
Recently I have been generating maps with the code below. However, due to the limitations of my data, said maps are narrow.
Thus, the generated images have wide white edges, which waste plenty of space on my document. I have attempted to implement the solution proposed at https://www.mathworks.com/help/matlab/creating_plots/save-figure-with-minimal-white-space.html. However, the resulting figures don't take into account the labels and I want to keep them in the image.
Can someone please advice me on how to proceed?
All answers are appreciated.
Thanks for reading.
figure
contourf(Y,X, Temperature)
hold on
axesm mercator;
plot(coastlon,coastlat,'k','LineWidth',2)
axis([-125 45 -40 70])
ax = gca; outerpos = ax.OuterPosition; ti = ax.TightInset; left = outerpos(1) + ti(1); bottom = outerpos(2) + ti(2); ax_width = outerpos(3) - ti(1) - ti(3); ax_height = outerpos(4) - ti(2) - ti(4); ax.Position = [left bottom ax_width ax_height];
c2 = colorbar;
xlabel('Longitude(^o)')
ylabel('Latitude(^o)')

답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by