NAME: PLOT2D PURPOSE: This routine provides a general purpose, flexible generic 2D plot package. It provides 2D TV, SURFACE, CONTOUR, and SHADE_SURF plot. It is very simple to use and provides various features of adjusting 2D plot area, size, style, title, comment, etc. 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. CATEGORY: Widgets. CALLING SEQUENCE: PLOT2D, DATA [,TLB] [,WIN] INPUTS: DATA: The 2D array to be plotted. KEYWORD PARAMETERS: XARR: Set this keyword to specify the corresponding x vector values. YARR: Set this keyword to specify the corresponding y vector values. 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. ZTITLE: Set this keyword to specify the ztitle string. CHARSIZE: Set this keyword to specify the plot charsize, default 1. CLASSNAME: Set classname used in output file construction. COMMENT: Set this keyword to write any notes on the graph. RXLOC: Set notes X ratio to plot device width, default 0.01. RYLOC: Set notes Y ratio to plot device height, default 0.98. STAMP: Print the time stamp on the graph. WTITLE: Set this keyword to specify the window title string, default to 'Plot2d'. WIDTH: The initial window width at the creation time, which default to 500 pixel. HEIGHT: The initial window height at the creation time, which default to 450 pixel. AX: This keyword specifies the rotated angle about the x-axis. AX>0 toward the viewer, AX<0 away from the viewer, default +30 degree (Surface plot) AZ: This keyword specifies the rotated angle about the z-axis, default 30 degree. (Surface plot) LEGO: This keyword specifies the z value as stacked histogram style plot. (Surface plot) SHADE: This keyword specifies the color shade for the surface plot. 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 PLOT2D. NCOLORS: If this keyword is specified, it overrides the actual size of the color table used in plot2d. ITOOLS: If specified the iTools menu is added IJOFFSET: [Ix,Iy] specifies offset indices of data array extracted from the original data array (used for Query Sub ROI...) OPTIONAL_OUTPUTS: TLB: The widget ID of the top level base returned by the PLOT2D. WIN: The window ID of the drawing area used by the PLOT2D. COMMON BLOCKS: COLORBAR. SIDE EFFECTS: The max and min value will be shown as the default comment. RESTRICTIONS: For contour plot only 12 levels are allowed. EXAMPLES: Example 1 - Create a resizable 2D plot without any title or label specification. PLOT2D, Data Example 2 - Create a resizable 2D plot with real X,Y values, title, stamp, Xtitle and Ytitle specification. PLOT2D,Data,Xarr=X,Yarr=y,Title=ti,Xtitle=xt,Ytitle=yt,/Stamp MODIFICATION HISTORY: Written by: Ben-chin Cha, Dec 16, 1998. 12-22-1998 Add zoom in/out button to control X, Y margins 01-15-1999 Allow 5 comment lines on plot Replace base widget MAIN13 by Plot2dMAIN13 03-05-1999 Add Plot Options support to let user set the plot margins, title, labels, color table, various plot style, etc. 03-17-1999 Add TV image options 05-14-1999 Add colorbar, save TIFF and GIF options 11-23-1999 Save images in TIFF/GIF destination directory Add option of N contour levels field Remove the common block definition 01-24-2000 Add TV step # or axis options 06-01-2000 Add colorbar_config dialog, and toggle the colorbar to get the colorbar redraw correctly Add classname for automatically generate output file 12-05-2000 Replace save 2D data as GIF by XDR option 02-15-2001 Add Data button to support 'plot2d.txt' report option 03-09-2001 Add xsize,ysize keyword to plot2d Default backgrand color change to white Initial colorbar use relative location PS use the TVRD exactly as shown on screen 05-29-2001 Add ascii format control on data output Allow the Color bar width, height ajustment 09-21-2001 Post script plot same as window size 01-18-2002 Add the PICK1D button to access plot1d, and ezfit 03-26-2002 Add drawing normalized X,Y profile event 05-01-2002 Add ncolors keyword, MMB event, check for max colors 03-01-2004 Add extraction of ROI dialog, RMB events (zoom) in drawing area Add query of value for i,j index event Add set z-value at the i,j index event Add top value color value event Add equal aspect ratio option to Plot Options dialog
(See plot2d.pro)