View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

SPECPLOT: non-interactive color overplotting of spectra

Frank Valdes wrote on Nov 16, 1998

Q:  I have a set of spectra (3) that I would like to overplot 
noninteractively with different colors. How can it be done using IRAF?


A:  What you want to do can either be done using the IGI package in STSDAS
or with SPECPLOT.  IGI is a plotting language that you make a command
file to do the plotting.

For SPECPLOT you would replace the interactive cursor input with input
from a file.  As an example,

cl> type colors.dat
5000 0 1 :color[1] 1
5000 0 1 :color[2] 2
5000 0 1 :color[3] 3
r
cl> specplot spec1,spec2,spec3 cursor=colors.dat autolayout=no

The form of a line in the input cursor file is x position (the
dispersion coordinate in spectra), y position, 1, and the command.  In
this case the x and y values don't matter but this particular program
needs some dummy values.  The first three commands set the colors
(colors are values 1-9) and the last command causes the graph to be
redraw with the colors.  To get an overplot instead of a stacked plot
you set "autolayout=no".  See the help for SPECPLOT if you don't know
about this program.  It can do many things.  Other things you might set
on the command line are the dispersion limits to plot just a part of
the spectral range.

To get colors on your screen you need a graphics terminal window.
This would be XGTERM from the IRAF project.  XTERM does not do colors.
Also to get color in a hardcopy requires special steps.

Last post on Nov 16, 1998