PDRAW(L) PDRAW(L) 4 September 1990 NAME pdraw - 3D plot program for X-windows and Postscript SYNOPSIS pdraw [-v vx vy vz] [-o options-file] [-Pprinter] [-s scale] [-e] [-h] [-nosort] [-ps] plotfile1 plotfile2... DESCRIPTIONS Pdraw is a program for drawing 3D plots on X10 or X11 windows. The program will also produce a POSTSCRIPT plot which can be dumped out to an APPLE Laserwriter. Pdraw reads in x-y-z data from a plot-file and manipulates that data according to options specified either in the command-line or in a options-file. The plot-file can be compressed (see compress[1]); compressed files will be uncompressed automatically. The program then plots lines on a screen or dumps the plots to a POSTSCRIPT file. The plot-file input data consists of alternating x, y and z values, in the format shown below. Data File Format (plot-file) xmin xmax ymin ymax zmin zmax ncurves npts z1 z2 .. .. .. npts z1 z2 .. .. .. In the above, xmin, xmax, ymin, ymax, zmin and zmax are lower and upper bounds of the desired plot, ncurves are the number of curves to be plotted, and npts are the number of points in each curve. The data file can consist of more than one set of curves to be plotted; each set (i.e. one set for each separate graph) is separated from the next by a blank line. Upon starting up the program, pdraw will read in the data stored in the plot-file, as well as any plotting options specified either in the command line or in the options-file. Pdraw then uses the given view direction to rotate and transform the plot onto a plane perpendicular to the viewing vector. Currently, only parallel projection is supported. If the program is being run under X-windows, the plot will then be drawn on the screen. The viewing vector can be changed using the "H", "J", "K", "L" and "O" keys on the the keyboards; the plot on the screen can be rotated sideways using the "H" or "L" keys, rotated up or down using the "J" and "K" keys, and drawn with the original viewing vector using "O". The "A", "S", "D" and "F" keys will produce 90o rotations. "Z" will plot the image - 1 - Formatted: November 14, 2024 PDRAW(L) PDRAW(L) 4 September 1990 projected on the x-y plane (z=constant), "Y" will plot the image projected on the x-z plane (y=constant), and "X" will plot the image projected on the y-z plane (x=constant). The final view angle will be saved and used for the POSTCRIPT plot. Finally, the user will be prompted as to whether or not the POSTSCRIPT plot is to be sent to a printer. OPTIONS -v vx vy vz reads in the viewing eye position, relative to (0,0,0). The plot will be rotated and transformed so that the z-axis is parallel to this position. For example, a view position of (1,0,0) means that the 3D structure is being viewed with parallel projection from the x-axis. -o options-file reads plotting options from the file options-file. Each option specification consists of a keyword and its corresponding value. The parser recognizes only a limited set of keywords; their values are either numbers, quoted strings, or the words "on" and "off". All the words in the option specification must be on the same line. The pound sign (#) indicates that the remainder of the line is a comment to be ignored by the parser. List of Options (options-file) xlabel "LABEL" #[default = "X-Axis"] - for the x-label ylabel "LABEL" #[default = "Y-Axis"] - for the y-label zlabel "LABEL" #[default = "Z-Axis"] - for the z-label toplabel "LABEL" #[default = "3D Line Plot"] - for the top-label equalscale on/off #[default = on] - for equal x-y scaling postscript on/off #[default = on] - for postscript (PS) plot printplot on/off #[default = off] - send PS file to printer noplot on/off #[default = off] - no graphics plot printer "PRINTER" #[default = $PRINTER] - define the printer line on/off #[default = on] - draw the line linechange on/off #[default = off] - change the linetypes marker on/off #[default = off] - draw the marker markerchange on/off #[default = off] - change the markertypes hiddenline on/off #[default = off] - for - 2 - Formatted: November 14, 2024 PDRAW(L) PDRAW(L) 4 September 1990 hidden-line drawings nosort on/off #[default = off] - for hidden-line drawings scale [0.1 - 1.0] #[default = 1.00] - scales the PS plot xticks [1 - 20] #[default = 2] - no. of x-divisions yticks [1 - 20] #[default = 2] - no. of y-divisions zticks [1 - 20] #[default = 2] - no. of z-divisions -Pprinter specifies which printer to which to send the postscript plot. The current default sets the printer name to the environment variable $PRINTER. If this variable is not set, then the printer used is the lp550M printer in 550M Cory. -s scale sets a scale factor. This is used only for POSTSCRIPT plotting. -e forces unequal scales to be applied to the x, y and z axes. The boundary of the 3D object will then resemble a cube. -h draws polygons with hidden-lines. -nosort prevents sorting for the hidden-line option. -noplot prevents plots on the graphics display. -print sends plots to the printer automatically. -ps turns the postscript plotting option off. host:display opens a window on the given host and display =geom -rv -bw border-width -bd color -fg color - 3 - Formatted: November 14, 2024 PDRAW(L) PDRAW(L) 4 September 1990 -bg color sets input options for the X-window system. BUGS Not really that many. The POSTSCRIPT labels need to be adjusted. The labels don't come out well when the picture is rotated beyond the default view. The parser needs to be improved. There should be a better way to put change linetypes and markertypes. Log axes might be nice. Also should incorporate drawplot modifications here. AUTHOR Kenny K.H. Toh (ktoh@mascot.berkeley.edu) FILES dataplot.ps temporary POSTSCRIPT file SEE ALSO contour(L), drawplot(L) - 4 - Formatted: November 14, 2024