|
Getting Started with IDL: Mapping |
|
Contour plots can easily be drawn over map projections by using the OVERPLOT keyword to the CONTOUR routine. See the map in the figure below. Enter the following at the Command Line:
WINDOW
A=DIST(91)
LAT=FINDGEN(91)*2-90
LON=FINDGEN(91)*4-180
MAP_SET,/GRID,/CONTINENTS,/SINUSOIDAL,/HORIZON
Since latitudes range from -90 to 90 degrees and longitudes range from -180 to 180 degrees, you created two vectors containing the "X" and "Y" values for CONTOUR to use in displaying the array A. If the X and Y values are not explicitly specified, CONTOUR will plot the array A over only a small portion of the globe.