Mapping Toolbox    

Displaying Vector Maps as Lines

The Mapping Toolbox lets you display vector map data as line objects much like the line display commands in MATLAB. The Mapping Toolbox line graphics functions have MATLAB analogs, the names of which can usually be determined by appending an 'm' to the MATLAB function name. For instance, the Mapping Toolbox version of plot is plotm.

The following table lists the available Mapping Toolbox line display functions:

Function
Used to Create
contourm
Contour plot of map data
contour3m
Contour plot of map data in 3-D space
linem
Line objects projected on map axes
plotm
Lines projected on map axes
plot3m
Lines projected on map axes in 3-D space

Plot the coast vector data using plotm. Just as with plot, you can specify line property names and values in the command:

Sometimes vector data represent specific points. Suppose you have variables representing the locations of Cairo (30°N,32°E), Rio de Janeiro (23°S,43°W), and Perth (32°S,116°E), and you want to plot them as markers only, without connecting line segments.

Here is the map:

In addition to these sorts of "permanent" geographic data, you can also display calculated vector data. Calculate and plot a great circle track from Cairo to Rio de Janeiro, and a rhumb line track from Cairo to Perth:


  Projected and Unprojected Objects Displaying Vector Maps as Patches