Mapping Toolbox    

Cartesian MATLAB Display Functions

If you cannot find a Mapping Toolbox display function that does what you need, you may be able to use a non-mapping MATLAB function. You can use the MATLAB function to add the graphic objects to the display, using latitude and longitude as x and y, and then project the data afterwards. For example, the Mapping Toolbox does not have a function that displays a triangulated surface from random data, but MATLAB does. Create such a map of the seamount data provided with MATLAB.

If the displayed objects are already in the right place and do not need to be projected, you can trim them to the map frame and convert them to mapped objects using trimcart and makemapped. They can then be manipulated as if they had been created with map display functions. This is useful when you want to get back the geographic coordinates.

You can also combine Mapping Toolbox and MATLAB commands to mix spherical and Cartesian coordinates. An example would be a quiver plot in which the locations of the vectors are geographic, but the lengths are not. In that case, you can use Mapping Toolbox projection calculations and MATLAB graphics commands. Cylindrical projections are the simplest. North is up and east is right, so just project the locations.

An extra step may be required for non-cylindrical projections. In these projections, the directions of north and east vary with location. To make the directions agree with the map grid, vectors should be rotated to bring them into alignment. This can be done with the vector transformation function vfwdtran. Consider the same data displayed on a conic projection.

Conformal projections are often the best choice for displays like this. They preserve angles, ensuring that the difference between north and east will always be 90 degrees in projected coordinates.


  Thematic Map Functions Colormap and Colorbars