Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: 14 December 2016

How do I quickly plot two columns from a file?


The make_figure routine creates a new plot, containing data read in from a file, along with several annotations, such as axis labels and a plot title. To plot the columns z and lx from the file bcg.dat you would say

make_figure("bcg.dat[cols z,lx]")
make_figure("bcg.dat[cols z,lx]", ["line.style","none","symbol.color","red"])
[The lx vs z data displayed as red crosses]

The first command uses the default settings for curves, while the second version overrides the defaults for line style and symbol color. The Attributes Concept documentation provides more information on changing properties of objects.

The make_figure() routine can also be used to plot data with symmetric y errors, create a histogram, or contour an image.

The ChIPS GUI

The ChIPS GUI makes it easy to modify a visualization using your mouse, rather than Python functions. The GUI can also be used to add annotations - such as labels, lines, points and regions - and to zoom or pan into plots.

The ChIPS Gallery

More examples can be seen in the ChIPS Gallery.



Last modified: 14 December 2016
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.