How to rotate a map?

14 次查看(过去 30 天)
HADJ MOHAMMED
HADJ MOHAMMED 2023-11-8
I have SST data in .nc format and I proceeded with this script
ncinfo('filename')
ncdisp('filename')
variable_name=ncread('filenema','variable_name')
[laty, lonx] = meshgrid (lat,lon)
mean_sst = mean(analysed_sst,3)
imagesc(lon,lat,mean_sst)
and I got this result but the map of South Korea is rotated, what can be the problem?
  1 个评论
Dyuman Joshi
Dyuman Joshi 2023-11-8
In the high-level version of the imagesc(), the direction of y-axis is reversed (along with some other changes), as can observed from the figure as well.
Another method to revert it back, aside from Chunru's answer below, is change the y-direction property to normal -
ax = gca;
ax.YDir = 'normal';

请先登录,再进行评论。

回答(1 个)

Chunru
Chunru 2023-11-8
It is upside down. Add the following:
axis xy
  2 个评论
HADJ MOHAMMED
HADJ MOHAMMED 2023-11-9
where I add it Please? because it didn't change
Dyuman Joshi
Dyuman Joshi 2023-11-9
Add it after the imagesc() call

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by