Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: 27 November 2012

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 sources.dat you would say

make_figure("sources.dat[cols x,lx]")
make_figure("sources.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 Pythoon functions. New in CIAO 4.5 is the ability to add annotations - such as labels, lines, points and regions - directly from the GUI.

The ChIPS Gallery

More examples can be seen in the ChIPS Gallery.



Last modified: 27 November 2012
CXC logo

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-2012. All rights reserved.