Mapping Toolbox | ![]() ![]() |
Project text annotation on map axes
Syntax
h = textm(lat,lon,string) h = textm(lat,lon,string,PropertyName
,PropertyValue,...) h = textm(lat,lon,z,string) h = textm(lat,lon,z,string,PropertyName
,PropertyValue,...)
Description
h = textm(lat,lon,string
) displays the strings (rows) of the matrix of strings string
at the geographic locations specified by the vectors lat
and lon
. The handles h
of the displayed strings can be returned.
h = textm(lat,lon,z,string
) displays the strings at the z-axis altitudes z
. The default altitude is 0.
h = textm(lat,lon,z,string
,PropertyName
,PropertyValue,...) sets the text object properties. All properties supported by the MATLAB text
command are supported by textm
.
Example
The feature of textm
that distinguishes it from the standard MATLAB text command is that the text
object is projected appropriately. Type the following:
axesm sinusoid framem('FEdgeColor','red') textm(60,90,'hello') figure; axesm miller framem('FEdgeColor','red') textm(60,90,'hello')
The string 'hello'
is placed at the same geographic point, but it appears to have moved relative to the axes because of the different projections. If the projection is changed using the setm
command, the text will move as necessary. Use text
to fix text objects in the axes independent of projection.
See Also
axesm |
Create map axes object |
text |
Create Text object in current Axes (see online MATLAB Function Reference) |
![]() | tagm | tightmap | ![]() |