필터 지우기
필터 지우기

Change interval values of lat and lon

조회 수: 2 (최근 30일)
Brendan Clark
Brendan Clark 2021년 3월 15일
댓글: Brendan Clark 2021년 3월 15일
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]);
Brendan Clark
Brendan Clark 2021년 3월 15일
Thank you!

댓글을 달려면 로그인하십시오.

답변 (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