How do I quickly plot two columns from a file?
The make_figure() (S-Lang, Python help) 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 x and y from the file data.fits you would say
# Python
make_figure("data.fits[cols x,y]")
make_figure("data.fits[cols x,y]", ["line.style","none","symbol.color","red"])
% S-Lang
make_figure("data.fits[cols x,y]");
make_figure("data.fits[cols x,y]", {"line.style","none","symbol.color","red"});
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.
More examples can be seen in the ChIPS Gallery (S-Lang and Python versions).
