Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: 27 November 2012

How do I quickly create a contour plot of an image?


The make_figure routine can be used to contour an image. If the image contains WCS information then the contours will be drawn using this grid, unless specified otherwise.

[Contour plot of an image]
make_figure("img.fits")
make_figure("img.fits", [10,20,30])
make_figure("img.fits", [10,20,30], ["wcs","physical","line.color","red"])

In the first example the contours will be drawn equally spaced between the minumum and maximum pixel values. In the other cases the levels will be drawn at 10, 20, and 30. In the last example the line color has been changed to red - as discussed in the Attribute Concept documentaion - and the axes drawn using the physical coordinate system (SKY for Chandra images).

The ChIPS GUI

The ChIPS GUI makes it easy to modify a visualization using your mouse, rather than Pythoon functions. New in CIAO 4.5 is the ability to add annotations - such as labels, lines, points and regions - directly from the GUI.

The ChIPS Gallery

More examples can be seen in the ChIPS Gallery.



Last modified: 27 November 2012
CXC logo

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2012. All rights reserved.