Graphics > Graphics Gallery > Modifying Visualizations > 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.

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

- Graphics examples
- IDL Graphics Functions
- ELLIPSE
- IMAGE
- POLYGON
- POLYLINE
- TEXT
- Changing graphics properties
- Multiple graphics in one window
- Save a graphic
- Formatting IDL Graphics Symbols and Lines