Change interval values of lat and lon

6 次查看(过去 30 天)
I am using pcolor to plot geographic data. Doing pcolor(double(Lon),double(Lat),X) displays values of longitude as 0, 50, 100, 150 etc and latitude as 0, 20, 40, 60 etc. How can I change the values of lat and lon displayed so they are in intervals of 30 for longitude (instead of 50) and 15 for latitude (instead of 20)? Will the grid lines also change?
  2 个评论
DGM
DGM 2021-3-15
Ticks and labels are axes properties. You can get a list of what the current settings are by running
get(gca);
You can see what options are are available for these properties by running
set(gca);
For tick locations, you can set them to whatever you want. For example:
set(gca,'xtick',[30 60 90 120],'ytick',[15 30 45 60]);

请先登录,再进行评论。

回答(1 个)

Cris LaPierre
Cris LaPierre 2021-3-15
Use the functions xticks and yticks.

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by