This HTML automatically generated with rman for NEMO
Table of Contents

Name

yapp - yet another plotting package

Synopsis


plinit(pltdev, xmin, xmax, ymin, ymax)    standardstring pltdev;real xmin,
xmax, ymin, ymax;
plltype(lwid, lpat)    standardint lwid, lpat;
plline(x, y)    standardreal
x, y;
plmove(x, y)    standardreal x, y;
plpoint(x, y)    standardreal x, y;
plcircle(x,
y, r)    optionalreal x, y, r;
plcross(x, y, s)    optionalreal x, y, s;
plbox(x,
y, s)    optionalreal x, y, s;
pltext(msg, x, y, hgt, ang)    standardstring msg;real
x, y, hgt, ang;
pljust(just)    standardint just;
plframe()    standard
plstop()    standard
plswap()    optional
plxscale(x,y)    optionalplyscale(x,y)    optionalreal
x,y;
plflush()             optional
pl_matrix(frame, nx, ny, xmin, ymin, cell,
fmin, fmax, findex)    non-standard
real *frame, xmin, ymin, cell, fmin, fmax, findex;
int nx, ny;
int pl_getpoly(x, y, n)    non-standardfloat x[], y[];int n;
int pl_cursor(x,
y, c)    non-standardfloat *x, *y;char *c;
int pl_screendump(fname)    non-standardchar
*fname;
int plcolor(color)    optionalint color;
int plncolors()    optional
int plpalette(r,
g, b, nc)    optionalreal r[], g[], b[];int nc;
int plgetraster(bitsptr, widthptr,
heightptr, depthptr)    optionalbyte **bitsptr;int *widthptr, *heightptr, *depthptr;
int
plputraster()    optional

Description

yapp is a set of simple interface routines to system graphics packages. The purpose of these routines is to provide a measure of portability for programs which generate graphics. The yapp routines are general enough for most applications, yet simple enough to implement on a wide range of systems. A minimum set of interface routines must exist for every yapp-interface, as denoted by the standard in the right column. Various versions exist for different devices. See yapp(5NEMO) .

plinit initializes the graphics package. Currently, pltdev is ignored in most versions. Some versions use an environment variable YAPP or system keyword yapp= through the getparam(3NEMO) user package to select a different device. xmin, xmax, ymin, and ymax specify the range of plotting coordinates to use. plinit fits a rectangle with aspect ratio (xmax - xmin) / (ymax - ymin) into the available plotting surface.

plltype sets the line width and dot-dash pattern. lwid is the line width, ranging upwards from 1 (thin). lpat is the line pattern; currently 1 specifies a solid line. If either angument is 0 or less, the corresponding line parameter is unchanged.

plline, plmove, and plpoint are basic graphics operations. Arguments x and y are scaled to the range specified by the call to plinit. plline draws a line from the current plotting position to x, y, which becomes the current position. plmove simply moves the current position to x, y. plpoint draws a point at x, y.

plcircle, plcross and plbox are basic symbol plotters. The first two arguments x and y are the center of the symbol. plcircle plots a circle with radius r. plcross and plbox plot a simple cross resp. box of size s. When s<0 the orientation of the symbols are at 45 degrees.

pltext plots a string of characters msg at position x, y (modified by pljust), with character height hgt, measured in user coordinates, and angle ang, measured counterclockwise in degrees.

pljust specifies the justification of text relative to x, y; values of just of -1, 0, and 1 imply left, middle and right justification respectively. By default, left justification is used.

plframe erases the current display and begins a new frame. An optional delay has sometimes been installed, or mouse interrogation to advance to next frame.

plstop closes the graphics package. Depending on implemented yapp version, this may be a 60 seconds delay, a request to press the RETURN key or a mouse button.

pl_matrix is non-standard, and only works with an old Postscript version. Needs proper device independant solution. Don’t use it for now.

pl_getpoly requires a yapp implementation with a mouse. It allows the user to define a polygon, whose vertex coordinates are stored in an array x[n],y[n] with minimum declared length n. pl_getpoly returns the actual stored number of vertices, which will be 3 or greater. Returns 0 if badly (zero) defined polygon has been entered. pl_getpoly does not store the first entered point again at the end. It assumes polygon is closed.

pl_cursor requires a yapp implementation with a mouse. It allows the user retrieve a cursor position, as well as the character that was pressed.

pl_screendump is a standard way to create some kind of memory image of the current display. Certain systems have fast ways to display such memory images and create a movie feature. On SUN’s there are two versions of movie: movie(1NEMO) runs on full screens, and moview(1NEMO) displays small images within the suntools environment.

plcolor specifies plotting color as an integer between 0 and ncolors-1; values outside this range are mapped to the nearest endpoint. The number of colors, ncolors is a number defined by the package, and can be obtained by calling plncolors.

plpalette re-initializes the color table with user supplied values in the arrays r[], g[] and b[], with nc entries each for the red, green and blue color respectively.

plgetraster is supplied for interfaces which support saving the image on the screen in the form of a raster image, much as pl_screendump(). With plputraster an image, previously saved with plgetraster can be (re)displayed.

The name yapp has nothing to do with yuppies; as far as I know, I chose this name before such lice were more than a gleam in the eye of Dr. Dan Asher.

Bugs

Line weight does not appear to affect point sizes. Better handling of out-of-bounds points and lines is required.

yapp shares some routine names with the Texax plplot subroutine library. Our version of yapp_plplot hence uses the c_ routine names.

No good method for properly selecting foreground and background color.

Author

Joshua E. Barnes

See Also

yapp(5NEMO)

Update History


xx-jun-87    documentation written                       JEB
16-aug-88    improved documentation                        PJT
10-dec-88    added pl_screendump                         PJT
19-jul-89    added doc for yapp_cg_new                    PJT
26-oct-90    added doc                                     PJT
8-feb-95    double is now real                           pjt
21-jan-00    pl_cursor                                   pjt


Table of Contents