NAME: PLOT1D PURPOSE: This routine provides a general purpose flexible cartesion plot package. It provides simple to use automatic feature of labels, legend, comment, line style, symbols, and color options on plot. The window generated by this routine will be resizable by the window manager. Depress the 'Print' button will generate a postscript copy of the graph. Normally it accepts two parameters X and Y. If the first parameter is not used then the data array is plotted on the ordinate versus the point number on the abscissa. Multiple curves (or variables) can be stacked into the second parameter as a two dimensional array, the first dimension gives the number of data points in each curve, the second dimension gives the number of curves to be plotted. CATEGORY: Widgets. CALLING SEQUENCE: PLOT1D, [X,] Y [,ID_TLB] [,ID_DRAW] INPUTS: X: The vector array for X abscissa. Y: The Y data array for curve plot. The Y array can contain more than one curve, the first dimension gives the number of data to be plotted for the curve, the second dimension gives the number of curves to be plotted. KEYWORD PARAMETERS: TITLE: Set this keyword to specify the plot title string. XTITLE: Set this keyword to specify the xtitle string. YTITLE: Set this keyword to specify the ytitle string. COLOR: Set this keyword to specify the color number used in the plot routine. FACTOR: Set the curve multiplication factor for the Y vector, default 1. CURVFIT: Set this keyword if two curves are plotted, first curve is the fitted curve, the second curve is data to be fitted. SYMBOL: Set this keyword to specify data plotted as symbol, set to -1 data plot as symbol and connected with line. XLOG: Set this keyword to specify a logrithmic X axis. YLOG: Set this keyword to specify a logrithmic Y axis. XRANGE: Set this keyword to specify the desired data range for the X axis. YRANGE: Set this keyword to specify the desired data range for the Y axis. XMARGIN: Set this keyword to specify the left and right margin, default xmargin=[10,3] YMARGIN: Set this keyword to specify the bottom and top margin default ymargin=[5,3] CHARSIZE:Set this keyword to specify the charsize THICK: Set this keyword to specify the line thickness for the axes and the line plot. LINESTYLE: Set this keyword to turn on different line style used. XSTYLE: Set this keyword to control x axis in IDL plot routine. YSTYLE: Set this keyword to control y axis in IDL plot routine. LEGEND: Set the legend strings corresponding to curves drawn. XYLEGEND: Set the x,y location of the legend strings, % from the lower left corner from the graph window, default xylegend=[0.83, 0.60]. COMMENT: Set this keyword to write any footnotes on the graph. STAMP: Set this keyword to put the time stamp and user ID on the page. WTITLE: Set this keyword to specify the window title string, default to 'Plot1d'. WIDTH: The initial window width at the creation time, which default to 350 pixel. HEIGHT: The initial window height at the creation time, which default to 350 pixel. GROUP: The widget ID of the group leader of the widget. If this keyword is specified, the death of the group leader results in the death of PLOT1D. DATA: Set this keyword if an xdisplayfile data button is desired REPORT: Set this keyword if an xdisplayfile report button is desired It specifies the report file name to be displayed. BUTTON: Set this keyword if no print and close buttons are desired for the PLOT1D widget. CLEANUP: Set this keyword if the created window can no be closed by the window manager is desired. BGREVS: Reverse background color OVERLAY: Speicify whether overlay option desired OPTIONAL_OUTPUTS: ID_TLB: The widget ID of the top level base returned by the PLOT1D. ID_DRAW: The widget ID of the drawing area used by the PLOT1D. COMMON BLOCKS: None. SIDE EFFECTS: If more than one curves are stored in the Y array, it automatically uses different color for each curve. If the color keyword is set by the user, then the specified color will be used for the whole plot. RESTRICTIONS: It is assumed that the X position array is the same for multiple curve plot. EXAMPLES: Create a resizable line plot without any title or label specification. x = !pi * indgen(100)/25 PLOT1D, x, sin(x) Create a resizable line plot with title specifications. PLOT1D, x, sin(x), title='title', xtitle='xtitle', ytitle='ytitle' Plot two curves with different linestyle and legend at default location. x=indgen(100) y=make_array(100,2) y(0,0)=sin(x * !pi / 50) y(0,1)=cos(x * !pi / 50) PLOT1D,x,y,legend=['line1','line2'],/linestyle Same as the above example plus symbol and a specified legend location. x=indgen(100) y=make_array(100,2) y(0,0)=sin(x * !pi / 50) y(0,1)=cos(x * !pi / 50) PLOT1D,x,y,/linestyle,symbol=-1, $ legend=['line1','line2'], xylegend=[0.5,0.9] Plot x,y array plus two lines of comment and a time stamp on the graph. PLOT1D,x,y,comment=['Comment line1','Comment line2'],/stamp MODIFICATION HISTORY: Written by: Ben-chin K. Cha, Mar. 7, 1996. 04-26-96 bkc Add the window cleanup keyword 10-28-96 bkc Add the xstyle and ystyle keywords 07-01-97 bkc Comment out LOADCT,39 inherit color from parent process 08-11-97 bkc Add the curvfit support, only two curves allowed 12-22-97 bkc Add the 24 bit color visual device support 09-04-98 bkc Fix the plot problem due to ymax eq ymin 09-19-99 bkc Support plot1d various plot options Support the multiple scatter plot Add the support of report, factor, charsize keywords 11-19-99 bkc Support auto-scaled/user-specified X,Y plot ranges Add multiple list selection of curves 02-12-01 bkc Support 'plot1d.txt' data report option 03-09-01 bkc Default white backgrund color Print button dum the screen plot by using TVRD PS Plot button generates PS plot output 02-18-02 bkc Add option of NPT slider to specify the last of the data points to be plotted for each curve 05-01-02 bkc Add FWHM_Y, FWHM_DY, Fitting, Statistic buttons Check for 24 bit display Add bgrevs keyword Check for incomplete color table size case Check for scattering data 1D plot 04-01-04 bkc Support both PseudoColor and TrueColor devices Add ITOOL... dialog for falling iplot 06-03-04 bkc Add overlay option to plot1d setup dialog
(See plot1d.pro)