Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Using IDL / Circles and Ovals

IDL

Circles and Ovals

Circles and Ovals

Use the ELLIPSE function to draw a circle or oval shape on an existing graphic. You can use ELLIPSE at the time you create the graphic, or from the command line after the graphic is displayed.

The example shows an image of Mars with a circle around a crater in the middle.

mars image

The code shown below creates the graphic shown above. You can copy the entire block and paste it into the IDL command line to run it.

; Define the image to display.
file = FILEPATH('marsglobe.jpg', $
   SUBDIRECTORY = ['examples', 'data'])
 
; Display the mars image.
mglobe = IMAGE(file, TITLE='Mars Study')
 
; Draw the crater study area using ELLIPSE.
crater = ELLIPSE(221, 197, TARGET=mglobe, $
   /DATA, MAJOR=25, COLOR='yellow', THICK=2, $
   FILL_BACKGROUND=0)
 
; Draw the text for the crater study area.
cratertext = TEXT(137, 235, 'Study Area $\zeta$', $
   COLOR='yellow', /DATA, FONT_SIZE=18)

Resources




© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us