next up previous contents
Next: Lecture 4: Images in Up: Lecture 3: More graphics Previous: IDL colourtables   Contents

Maps in IDL

IDL has reasonably good facilities for drawing maps and for displaying data on top of them. To begin drawing data on a map, you must first use the map_set command:

IDL> map_set, /continents, /mercator, /isotropic

The Mercator projection is just one of a selection available - check the section on the map_set command in the manual for more details. Map_set establishes a geographical co-ordinate system - most of the plotting commands work on top of the map. They assume that your x co-ordinate is longitude and your y co-ordinate is latitude.

For example: after the map_set command above, try this:

IDL> map_set, /continents, /mercator, /isotropic
IDL> longitude=findgen(360)-180
IDL> latitude=60*sin(longitude*!Pi/180.)
IDL> oplot,longitude,latitude

Contour plots, including filled ones, will work on top of a map, too.

To sum up, we have seen a number of ways of plotting a 2-dimensional data set and shown how colours are used in IDL and taken a quick look at IDL's mapping abilities. In the next section, we will look at how IDL can be used to display and process images.



John Marsham 2005-04-22