plotm
Project 2-D lines and points on map axes
Syntax
描述
plotm
is the mapping equivalent of the MATLAB®plot
function.
plotm(
displays projected line objects on the current map axes.lat
,lon
)lat
andlon
are the latitude and longitude coordinates, respectively, of the line object to be projected. This ordering of latitude then longitude is standard geographic usage. However, this ordering is conceptually reversed from the MATLABline
function, in which thehorizontal(x) coordinate comes first.
plotm(
uses name-value pair arguments to specify any number ofLine Propertiesexcept forlat
,lon
,Name,Value)XData
,YData
, andZData
.Name
is the property name andValue
is the corresponding value.Name
must appear inside single quotes (' '
). You can specify several name and value pair arguments in any order asName1,Value1,...,NameN,ValueN
. Property names can be abbreviated, and case does not matter.
returns a handle to the displayed line.h
= plotm(___)
Examples
Input Arguments
Output Arguments
Tips
When you pass two points to theplotm
function, the function projects the locations of each point on the map and displays a straight line that connects them, regardless of the map projection or the distance between the points. To display a projected geodesic or rhumbline curve between two points, first insert intermediate points using thetrack2
function.