NAME: plotspec PURPOSE: Plot OSIRIS XD spectral data with wavelength scale. DESCRIPTION: CATEGORY: Spectroscopy CALLING SEQUENCE: plotspec,calib,spec,YRANGE=yrange,TITLE=title,SMOOTH=smo_fac INPUTS: calib- Anonymous structure containing all pertinent calibration information. This structure is usually loaded beforehand using the routine, "ldcalir" spec - 1-D spectrum vector. OPTIONAL INPUT PARAMETERS: KEYWORD INPUT PARAMETERS: BADFLAGS = Flag array, same length as spec. If set, the data point is bad and should not be plotted. Default is to plot all. COLOR = color index for data plot, does not affect the axes and labels. If a scalar is provided, the same color is applied to all orders. A vector implies that the colors in the vector should be applied to each order. If the color "array" has fewer elements than there are orders, then the last color is replicated to all the remaining orders. OPLOT = flag, if set, plot is overplotted, axes are not redrawn. XRANGE = (same as PLOT control, default is min to max), ignored if OPLOT set YRANGE = (same as PLOT control, default is min to max), ignored if OPLOT set TITLE = (same as PLOT control, default is blank) SMOOTH = smoothing factor for data, default is no smoothing. Uses the smooth() function on each order individually. LOWESS = order of polynomial for lowess smoothing. If lowess=0 (default) then the smoothing is done using the IDL built-in smooth function. for values of lowess > 0, lowess smoothing is done with this order smoothing polynomial function. NORDER = Order of spectrum to plot (default=plot all orders). This can be a vector that lists more than one order to plot. NOWAVENUM = Flag, if set suppresses the wavenumber axis labeling on the top of the plot. Accepts all other PLOT and OPLOT keywords. OUTPUTS: plot to current output device with wavelength scale. Each order is plotted a disconnected line from the other orders. KEYWORD OUTPUT PARAMETERS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: MODIFICATION HISTORY: 95/03/24, Written by Marc W. Buie, Lowell Observatory 95/09/15, MWB, added calib structure usage. 96/05/28, MWB, mods for new calib structure. 98/06/12, MWB, added BADFLAGS keyword and wavenumber scale on top. 98/08/28, MWB, added LOWESS keyword smoothing option.