Project text annotation on map axes
h = textm(...)
the text in
string onto the current map axes at
the locations specified by the
The units of
'angleunits' property of the map axes.
lon contain multiple
textm places a text object at each location.
In this case
string may be a cell array of strings
with the same number of elements as
(For backward compatibility,
string may also be
a 2-D character array such that size
the text at the altitude(s) specified in
must be the same size as
The default altitude is 0.
the text object properties. All properties supported by the MATLAB®
text function are supported by
h = textm(...) returns the
handles to the text objects drawn.
The feature of
textm that distinguishes it
from the standard MATLAB text function is that the
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')
'hello' is placed at the same
geographic point, but it appears to have moved relative to the axes
because of the different projections. If you change the projection
setm function, the text moves as necessary.
text to fix text objects in the axes independent
You may be working with scalar
If you are in scalar mode and you enter a cell array of strings, you
will get a text object with a multiline string. Also note that vertical
slash characters, rather than producing multiline strings, will yield
a single line string containing vertical slashes. On the other hand,
lon are nonscalar,
then the size of the cell array input must match their size exactly.