필터 지우기
필터 지우기

insert textbox in a geoshow plot

조회 수: 47 (최근 30일)
Moon Datta
Moon Datta 2015년 6월 25일
편집: Chad Greene 2015년 6월 25일
I am using a code as below for a geoshow plot-----
figure1 = figure; load coast; axes1 = axes('Parent',figure1,'FontSize',12,'DataAspectRatio',[1 1 1],'CLim',[0 4000]); box(axes1,'on'); grid(axes1,'on');
geoshow(lat, long,'Color', 'black'); geoshow(latpr, longpr,'Color', 'blue'); geoshow(Lat_receiver,Lon_receiver,'DisplayType','point','Marker','.','MarkerSize', 30,'MarkerEdgeColor', 'green');
latpr, longpr is the set of data of a path that I want to show. Now I want to insert a text in the plot that is lat, long of the starting point (latpr(1,1), longpr(1,1)) and of the last point(latpr(end,1), longpr(end,1)).
How to insert the text?
Thanks in advance!

답변 (2개)

Chad Greene
Chad Greene 2015년 6월 25일
편집: Chad Greene 2015년 6월 25일
Use textm, which works exactly like text, but in geocoordinates:
textm(latpr(1,1), longpr(1,1),'starting point')
You can also add formatting:
textm(latpr(end,1),longpr(end,1),'ending point',...
'fontweight','bold',...
'color','red',...
'fontsize',40,...
'horizontalalignment,'center',...
'verticalalignment','middle',...
'backgroundcolor','blue')

Purushottama Rao
Purushottama Rao 2015년 6월 25일
text(0.5,0.5,'data')
will display data string according to 0.5 nd 0.5

카테고리

Help CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by