Table of Contents
yapp - Yet Another Plotting Package
yapp is NEMO’s application
programming interface definition for a graphics device.
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
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)
are some example $YAPP_XXX environment variables defined in the $NEMO/NEMORC
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
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.
- wrapper, which attempts (with
or without some help) to include the correct yapp_xxx.c version (see below).
- uses Trieste/ESO’s AGL package. Not implemented yet.
color graphics version for suncore (JEB)
- slightly outdated
color graphics (PSW & JEB).
- ??? seems to hang terminal (oct-90)
- old 1986 experiment, uses CGI; must be outdated by now (PJT)
- 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.
- An ascii meta-file format.
usage when mongo(87) is available. Uses environment varibiable YAPP, initialized
in the getparam(3NEMO)
package, to select from a number of devices. (PJT)
- a stubbed list of all required and optional routines which gets
you going on a machine with no proper yapp implementation yet.
- uses Tim Pierson‘s (Caltech) PGPLOT package. We now support PGPLOT V5 as
well as an experimental version of CPGPLOT (PJT)
- uses the U.
Texas PLPLOT package, a PGPLOT lookalike written in C. (PJT)
merged with JEBs enhanced versions(PJT). Does not do color yet.
Mongo - not very good yet since sm doesn’t have good callable provisions. (PJT)
- Suntools version with enhanced cursor interaction; has optional
-DMOUSE, -DCOLOR and -DRETAINED and autodetection of window vs. non-window mode
under suntools. deprecated.
- 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)
- Based on a standalone,
now modified to handle singleprecision real (float).
Treatment of colors, in particular what the background
and foreground color is, is not uniform.
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_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
For X windows drivers (e.g. /xs and /xw) a number of X resources are used
! settings for pgplot
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
xrdb -merge ~/.Xdefaults
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
pdfcairo,FILE.pdf PDF (cairo)
pdf,FILE.pdf PDF (Haru)
NEMO/src/kernel/yapp various yapp_* implementations
Joshua E. Barnes, Peter Teuben
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