This HTML automatically generated with rman for NEMO
Table of Contents

Name

yapp - Yet Another Plotting Package

Description

yapp is NEMO’s application programming interface definition for a graphics device.

Various implementations exist for yapp, some of which are listed below. During installation one of them has been selected as your default implemention, with which all yapp-based graphics programs (a few programs, e.g. xyzview(1NEMO) ) use other graphics device drivers). Currently (2001) most used at the PGPLOT and PS implementations.

Hopefully one of them is close enough (or exactly) for what you want. Note that most of them need to be linked (notable exceptions yapp_null, yapp_ps, yapp_meta) with site dependant external libraries. For this, the environment variable YAPPLIB needs to be defined. Most common graphics program can then be compiled as follows:

    cc -o prog prog.c $NEMOLIB/libnemo.a $YAPPLIB -lm
normally set through the $NEMO/NEMORC.local file (see nemorc(8NEMO) ) There are some example $YAPP_XXX environment variables defined in the $NEMO/NEMORC file.

Some yapp implementations allow you to select from various devices. As we do not advertise interactive programs very much, the keyword ’yapp=’ or an environment variable YAPP will be used to select a device and it’s possible options.

Available Yapp Versions

yapp
wrapper, which attempts (with or without some help) to include the correct yapp_xxx.c version (see below).
yapp_agl    
uses Trieste/ESO’s AGL package. Not implemented yet.
yapp_cg        
pure color graphics version for suncore (JEB)
yapp_cg_old
slightly outdated color graphics (PSW & JEB).
yapp_cg_new
??? seems to hang terminal (oct-90)
yapp_cgi    
old 1986 experiment, uses CGI; must be outdated by now (PJT)
yapp_core    
The old original one (JEB), uses suncore, can have optional mouse interface (-DMOUSE) and retained segments (-DRETAINED). Working on color interface (-DCOLOR), see also yapp_cg below.
yapp_meta    
An ascii meta-file format.
yapp_mongo    
for usage when mongo(87) is available. Uses environment varibiable YAPP, initialized in the getparam(3NEMO) package, to select from a number of devices.    (PJT)
yapp_null
a stubbed list of all required and optional routines which gets you going on a machine with no proper yapp implementation yet.
yapp_pgplot    
uses Tim Pierson‘s (Caltech) PGPLOT package. We now support PGPLOT V5 as well as an experimental version of CPGPLOT (PJT)
yapp_plplot    
uses the U. Texas PLPLOT package, a PGPLOT lookalike written in C. (PJT)
yapp_ps        
PostScript, merged with JEBs enhanced versions(PJT). Does not do color yet.
yapp_sm    
Super Mongo - not very good yet since sm doesn’t have good callable provisions.    (PJT)
yapp_suntools
Suntools version with enhanced cursor interaction; has optional -DMOUSE, -DCOLOR and -DRETAINED and autodetection of window vs. non-window mode under suntools. deprecated.
yapp_sv
SunView version, in so-called implicit dispatch mode. This version is really only intended to create small images, to be saved in screendump ’frame’s, which can be displayed with the sunview windows version moview(1NEMO) . deprecated.
yapp_x11
Based on a standalone, now modified to handle singleprecision real (float).

Bugs

There are no good provisions to make sure a plot comes out in landscape or portrait (e.g. plplot). Some devices have problems making sure that the plot comes out square when it is meant to be square.

Treatment of colors, in particular what the background and foreground color is, is not uniform.

Pgplot

PGPLOT uses a number of environment variables that control the behavior of the plotting device. The PGPLOT_DIR, PGPLOT_FONT and PGPLOT_LIB variables (should) have been set via the normal NEMO procedure, but the following environment variables can be useful (and confusing):
PGPLOT_BACKGROUND    n/a    0 is the background color ("black" for /xs)
PGPLOT_FOREGROUND    n/a    1 is the foreground color ("white" for /xs)
PGPLOT_GIF_WIDTH    850    pixels for /gif (interchange for /vgif)
PGPLOT_GIF_HEIGHT    680    pixels for /gif (i.e. 85 dpi)
PGPLOT_PNG_WIDTH    680    pixels for /png
PGPLOT_PNG_HEIGHT    680    pixels for /png
PGPLOT_PPM_WIDTH    850    pixels for /ppm (interchange for /vppm)
PGPLOT_PPM_HEIGHT    680    pixels for /ppm (i.e. 85 dpi)
PGPLOT_PS_MARKERS    n/a    use "NO" if no postscript font for markers to be used
PGPLOT_PS_COLOR        n/a    color mode
PGPLOT_PS_WIDTH        7800    width in milli-inches (these are for 8.5x11 inches)
PGPLOT_PS_HEIGHT    10500    height in milli-inches
PGPLOT_PS_HOFFSET    350    horizontal offset from bottom left
PGPLOT_PS_VOFFSET    250    vertical offset from bottom left
PGPLOT_PS_EOF        n/a    EOF marker, useful for apple laserwriters (^D)
PGPLOT_PS_BBOX        n/a    if set to "MAX", max bounding box written, else
PGPLOT_IDENT        n/a    if set, user name, date and time written in bottom right
corner
PGPLOT_PS_DRAW_BBOX
For X windows drivers (e.g. /xs and /xw) a number of X resources are used (see xrdb(1) ), e.g.
!       settings for pgplot
pgxwin.Win.geometry: WIDTHxHEIGHT+X+Y
pgxwin.Win.iconGeometry: +X+Y
if you store them in a file ~/.Xdefaults, they can be merged into your X session as follows, after you make sure any old pgplot xwin_server has been killed:
    xkill pgxwin_server
    xrdb -merge ~/.Xdefaults

Plplot

Like PGPLOT, PLPLOT can also pick different graphics output devices, specified via the usual yapp= system keyword, followed by a filename for the non-interactive devices. Here are a few, though specifying yapp=help should give the list of currently compiled devices. For a full list see e.g. http://plplot.sourceforge.net/docbook-manual/plplot-html-5.15.0/devices.html
png,FILE_%n.png        PNG
pdfcairo,FILE_%n.pdf    PDF (cairo)
pdf,FILE_%n.pdf        PDF (Haru)
svg,FILE_%n.svg        SVG
xwin
tk

Files


NEMO/src/kernel/yapp    various yapp_* implementations

Author

Peter Teuben

See Also

catps(1NEMO) , catpgps(1NEMO) , yapp(1NEMO) , yapp(3NEMO)

Update History


16-aug-88    document written - some are premature!    PJT
16-nov-88    yapp_suntools added                 PJT
26-oct-90    updated outdated documentation      PJT
11-nov-94    added yapp_meta     PJT
28-mar-04    added some useful PGPLOT info    PJT


Table of Contents