|
|
|
|
Gallery: Basic curves (Python)Examples
A curve marked with symbols and connected by a red line
crv = ChipsCurve()
crv.symbol.size = 3.0
crv.line.color = "red"
add_curve("spectrum.fits[cols x,y]",crv)
A curve marked with diamonds
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
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
x = numpy.arange(1.0,10.0,2.0)
y = x**2
dx = x*0 + 1
dylo = y*0.15
dyhi = y*0.1
add_curve(x,y,[dylo,dyhi,dx,dx])
# Change the curve properties
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. |