About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: 20 May 2008
Hardcopy (PDF): A4 | Letter

How do I create a contour plot of an image?


Contour plots of FITS images can be created using either make_figure or add_contour:

# Python
  make_figure("img.fits")
  make_figure("img.fits",[1,2,3])
  make_figure("img.fits",[1,2,3],["color","red"])

  add_contour("img.fits")
  add_contour("img.fits",[1,2,3])
  add_contour("img.fits",[1,2,3],["color","red"])
% S-Lang
  make_figure("img.fits");
  make_figure("img.fits",[1,2,3]);
  make_figure("img.fits",[1,2,3],{"color","red"});

  add_contour("img.fits");
  add_contour("img.fits",[1,2,3]);
  add_contour("img.fits",[1,2,3],{"color","red"});

These commands create a contour plot of the image img.fits using: a set of default contour levels calculated from the image, the contour levels 1,2,3, and the contour levels 1,2,3 along with using a red color to draw the contours.



Hardcopy (PDF): A4 | Letter
Last modified: 20 May 2008


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-2004. All rights reserved.