In any IDL graphics display, you can add annotations when you create the visualization or after you display it. The following kinds of annotations are available:
Drawing circles and ovals using ELLIPSE
Drawing multi-sides shapes using POLYGON
Drawing lines and arrows using POLYLINE
Adding text and symbols using TEXT
The graphic below shows examples of all these annotation types. For the detail on each type, click the links above.
The code shown below opens and displays the mars image. You can copy the entire block and paste it into the IDL command line to run it.
file = FILEPATH('marsglobe.jpg', $
SUBDIRECTORY = ['examples', 'data'])
mglobe = IMAGE(file, TITLE='Mars Study')
crater = ELLIPSE(221, 197, TARGET=mglobe, $
/DATA, MAJOR=25, COLOR='yellow', THICK=2, $
FILL_BACKGROUND=0)
cratertext = TEXT(137, 235, 'Study Area $\zeta$', $
COLOR='yellow', /DATA, FONT_SIZE=12)
coords = [[116, 298],[251, 298], $
[268, 147], [135, 147]]
alpha = polygon(coords, TARGET=mglobe, /DATA, $
FILL_BACKGROUND=0, COLOR='white', THICK=2)
alphatext = TEXT(113, 307, TARGET=mglobe, $
'Study Area $\alpha$', $
COLOR='white', /DATA, FONT_SIZE=14)
landingsite = ARROW([[35, 251],[68,300]], $
TARGET=mglobe, /DATA, COLOR='blue', THICK=2)
landtext = TEXT(19, 235, TARGET=mglobe, $
'$\approx$ Landing', $
/DATA, COLOR='blue', FONT_SIZE=14)
Resources