フィルターのクリア

How to tighten the space of a worldmap plot

1 回表示 (過去 30 日間)
Meir Zeilig Hess
Meir Zeilig Hess 2022 年 3 月 20 日
編集済み: Meir Zeilig Hess 2022 年 3 月 22 日
I am trying to plot a geophysical variable on a sphere, using the following code:
[lat_grid,lon_grid] = meshgrid(Y,X); % Creating the grid from the vectors of latitude and longitude
load coast;
worldmap('World');
setm(gca,'Origin',[0 180]);
geoshow(lat,long);
pcolorm(lat_grid,lon_grid,Var); % plotting the geophysical variable "Var"
colormap('jet');
In the plot I get there is a lot of unnecessary space between the axes and the figure's frame:
I tried to remove space by using:
axis tight;
and then by using:
ax = gca;
ax.Position = [0.0, 0.0, 1.0, 1.0];
but there is still a lot of unwanted space between the actual plot and the figure's frame.
I would like to know how to minimize that space.
Thanks in advance,
Meir.

回答 (1 件)

Burhan Burak AKMAN
Burhan Burak AKMAN 2022 年 3 月 20 日
I think, you would try this code;
xlim([-20000000 20000000])
ylim([-10000000 10000000])
  1 件のコメント
Meir Zeilig Hess
Meir Zeilig Hess 2022 年 3 月 20 日
Sorry, it didn't have any effect on my plot.

サインインしてコメントする。

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by