Skip to main content

7.4) Contouring Onto A Map


Since our data is geographical, it would be nice to plot the data onto a map rather than just a set of axes. It is very easy in IDL to display a map and plot data onto it. First we set up the map coordinate system using the "map_set" procedure:

map_set, /mercator, limit=[0,-30,40,40]

There are many different keywords available to map_set to control the characteristics of the map. Have a look at the IDL help pages for the map_set procedure to see them all. Here we have used just two, the project type (/mercator) and the latitude/longitude limits of the map (limit=[lonmin,latmin,lonmax,latmax]).

Now we can add our contour plot using /overplot:

contour, q(*,*,20,0), lon, lat, levels=levs, c_labels=labels, /fill, /overplot

We can then use the procedure "map_continents" to put the continental outlines onto the plot:

map_continents

Again, there are many keywords available to map_continents, check the IDL help pages.