|
|
|
|
Gallery: Error bars (S-Lang)ExamplesSymmetric Y errors
variable crv = ChipsCurve;
crv.line.style = "noline";
add_curve("spectrum.fits[residuals][cols x,y,dylo]",crv);
set_curve({"symbol.style","circle","symbol.size",3.0,"symbol.color","red"});
log_scale(X_AXIS);
Errors for both the X and Y axes
variable tbl = read_file("spectrum.fits[residuals]");
variable x = get_colvals(tbl,"x");
variable y = get_colvals(tbl,"y");
variable dylo = get_colvals(tbl,"dylo");
variable dyhi = get_colvals(tbl,"dyhi");
variable dxlo = get_colvals(tbl,"dxlo");
variable dxhi = get_colvals(tbl,"dxhi");
add_curve(x,y,{dylo,dyhi,dxlo,dxhi});
variable crv = ChipsCurve;
crv.line.style = "noline";
crv.symbol.style = "none";
crv.err.style = "capped";
set_curve(crv);
limits(X_AXIS,3.0,AUTO);
A histogram with errors and symbols
variable tbl = read_file("histogram.fits");
variable xlo = get_colvals(tbl,"xlo");
variable xhi = get_colvals(tbl,"xhi");
variable y = get_colvals(tbl,"y");
variable dylo = get_colvals(tbl,"dylo");
variable dyhi = get_colvals(tbl,"dyhi");
add_histogram(xlo,xhi,y,dylo,dyhi);
set_histogram({"symbol.style","circle","symbol.size",3.0,"symbol.fill",0});
|
![]() |
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. |