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

Skip the navigation links
Last modified: 10 December 2007

URL: http://cxc.harvard.edu/chips4.0/gallery/contours.sl.html
Hardcopy (PDF): A4 | Letter

Gallery: Contours (S-Lang)

Examples


A simple contor plot

[ChIPS output]
Postscript version
add_contour("contours.fits",[53.6454,57.5304,63.1794],{"wcs","params"});

add_vline(6.72,{"style","dot"});
add_hline(0.79,{"style","dot"});

limits(X_AXIS,4.0,13.0);
limits(Y_AXIS,0.0,2.0);

set_plot_xlabel("kT_x (keV)");
set_plot_ylabel("Abundance");

Two sets of contours in the same plot

[ChIPS output]
Postscript version
add_contour("contours.fits",[53.6454,57.5304,63.1794],{"wcs","params"});
add_contour("contours.fits",[55.9554,60.5554],{"wcs","params","style","dot","color","red"});

limits(X_AXIS,4.0,14.0);
limits(Y_AXIS,0.0,2.0);

add_point(6.72,0.79,{"size",7.0});

add_label(11.0,1.8,"1,2,3 \sigma"R);
add_label(11.0,1.67,"90, 99%",{"color","red"});

current_label("all");
set_label({"size",14.0});

% Place a region behind the labels to highlight them
variable xr = [10.8,12.8,12.8,10.8];
variable yr = [1.63,1.63,1.91,1.91];
add_region(xr,yr,{"fill.visible",1,"fill.color","gray","edge.style","noline","depth",50});

set_plot_xlabel("kT_x (keV)");
set_plot_ylabel("Abundance");

Contouring an image using the WCS information

[ChIPS output]
Postscript version
add_contour("a2142_smoothed.fits",[4.0,11.0,18.0,25.0,32.0,39.0,46.0,53.0]);

reverse_axes(X_AXIS);
set_xaxis({"tickformat","ra"});
set_yaxis({"tickformat","dec"});

set_plot_title("Abell 2142");
set_plot_xlabel("Right Ascension");
set_plot_ylabel("Declination");
set_plot({"leftmargin",0.25});
set_yaxis({"offset.perpendicular",80});
Hardcopy (PDF): A4 | Letter
Last modified: 10 December 2007


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.