필터 지우기
필터 지우기

how can I change worldmap axes grid and label?

조회 수: 4 (최근 30일)
ysm ony
ysm ony 2024년 5월 22일
댓글: ysm ony 2024년 5월 23일
Hi, I am trying to make a map with spesific lat and lon degrees. And I want to make labelling and grids on 26 E, 29 E, 32 E, 35 E,38, E41 E,44 E. But whatever I tried the labelling and grid never start from 26 E. I add my result picture below. Please help me.
clear all
close all
clc
xmin = 26;
xmax = 44.6;
ymin = 34;
ymax = 42.5;
latlim = [ymin ymax];
lonlim = [xmin xmax];
w=worldmap(latlim,lonlim)
p=findobj(w,'Tag','Parallel');
m=findobj(w,'Tag','Meridian');
p.LineWidth = 1.5;
p.Color='red';
m.LineWidth = 1.5;
m.Color='red';
bordersm('Turkey')
bordersm('Cyprus')

채택된 답변

Cris LaPierre
Cris LaPierre 2024년 5월 22일
편집: Cris LaPierre 2024년 5월 22일
Use setm to set the meridian line & label locations ('MLineLocation' and 'MLabelLocaton' properties).
Also, you can use gridm to set your grid properties.
xmin = 26;
xmax = 44.6;
ymin = 34;
ymax = 42.5;
latlim = [ymin ymax];
lonlim = [xmin xmax];
w=worldmap(latlim,lonlim);
setm(gca,'MLabelLocation',26:3:44,'MLineLocation',26:3:44)
gridm('GLineWidth',1.5,'GColor','red')
  댓글 수: 1
ysm ony
ysm ony 2024년 5월 23일
Thank you, this is exactly what I needed.

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

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by