|
|
|
|
Gallery: Overplotting curves (S-Lang)ExamplesTwo curves in the same plot
variable crv = ChipsCurve;
crv.line.style = "noline";
crv.symbol.style = "square";
crv.symbol.size = 3.0;
crv.symbol.fill = 0;
add_curve("spectrum.fits[data][cols x,y]",crv);
crv = ChipsCurve;
crv.symbol.style = "none";
crv.line.color = "red";
crv.line.thickness = 2;
add_curve("spectrum.fits[fit][cols x,y]",crv);
log_scale(XY_AXIS);
set_plot_xlabel("Energy (keV)");
set_plot_ylabel("Count s^{-1} keV^{-1}");
set_plot_title("Source spectrum");
set_xaxis({"offset.perpendicular",35});
set_plot({"leftmargin",0.25});
set_yaxis({"offset.perpendicular",45});
add_line(0.6,3.0e-4,0.9,3.0e-4,{"color","red","thickness",2});
add_label(1.0,3.0e-4,"Model",{"color","red","valign",0.5});
Two curves in the same plot, one with error bars
add_window(6.0,3.0);
variable crv = ChipsCurve;
crv.line.style = "noline";
crv.symbol.style = "square";
crv.symbol.size = 3.0;
crv.symbol.fill = 0;
add_curve("spectrum.fits[data][cols x,y,dylo,dyhi]",crv);
crv = ChipsCurve;
crv.symbol.style = "none";
crv.line.color = "red";
crv.line.thickness = 2;
add_curve("spectrum.fits[fit][cols x,y]",crv);
log_scale(XY_AXIS);
limits(X_AXIS,0.5,10.0);
set_plot_xlabel("Energy (keV)");
set_plot_ylabel("Count s^{-1} keV^{-1}");
set_xaxis({"offset.perpendicular",35});
set_plot({"leftmargin",0.15});
set_yaxis({"offset.perpendicular",45});
|
![]() |
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. |