|
Getting Started with IDL: Mapping |
|
Drawing continental outlines and plotting data in different projections is easy using IDL's mapping routines. The MAP_SET routine is the heart of the mapping package. It controls the type of projection and the limits of the global region to be mapped.
WINDOW
MAP_SET,/CYLINDRICAL,/GRID,/CONTINENTS,/LABEL
The CYLINDRICAL keyword tells MAP_SET to use the cylindrical projection. The GRID keyword causes the latitude and longitude lines to be drawn. The LABEL keyword adds the latitude and longitude labels. The CONTINENTS keyword tells MAP_SET to draw continental outlines.
A similar map could be created by entering a series of separate commands to set up the type of projection, draw the continent outlines, and then draw the grid lines.
Although the single-line MAP_SET command is quicker to enter, by using the separate MAP_SET, MAP_GRID, and MAP_CONTINENTS commands, you exercise more control over the map colors, fills, and so on.
LOADCT,39
MAP_SET,/MILLER
MAP_CONTINENTS,COLOR=220,/FILL
MAP_GRID,COLOR=160,/LABEL
![]() |
The order of MAP_GRID and MAP_CONTINENTS depends on how you wish to display your map. In the above example, if you call MAP_GRID before MAP_CONTINENTS, the filled continents are drawn over the labeled grid lines.
WDELETE
IDL Online Help (March 06, 2007)