|
|
|
|
Gallery: Basic curves (S-Lang)Examples
A curve marked with symbols and connected by a red line
variable crv = ChipsCurve;
crv.symbol.size = 3.0;
crv.line.color = "red";
add_curve("spectrum.fits[cols x,y]",crv);
A curve marked with diamonds
variable crv = ChipsCurve;
crv.line.style = "noline";
crv.symbol.style = "diamond";
crv.symbol.size = 3.0;
add_curve("spectrum.fits[cols x,y]",crv);
log_scale(Y_AXIS);
A curve connected by a dotted line
variable crv = ChipsCurve;
crv.line.style = "dot";
crv.symbol.style = "none";
add_curve("spectrum.fits[cols x,y]",crv);
log_scale(X_AXIS);
A curve showing the full range of options
% Create x, y, and error arrays
variable x = [1.0:10.0:2.0];
variable y = x^2;
variable dx = x*0 + 1;
variable dylo = y*0.15;
variable dyhi = y*0.1;
add_curve(x,y,{dylo,dyhi,dx,dx});
% Change the curve properties
variable crv = ChipsCurve;
crv.line.color = "red";
crv.line.style = "longdash";
crv.symbol.color = "green";
crv.symbol.style = "circle";
crv.err.style = "capped";
crv.err.color = "blue";
set_curve(crv);
log_scale(Y_AXIS);
set_plot_title("y=x^2");
|
![]() |
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. |