This HTML automatically generated with rman for NEMO
Table of Contents


yapp - simple scripting interface to yapp


yapp [parameter=value]


YAPP (Yet Another Plotting Package) is the plotting interface for most NEMO programs. The yapp= program keyword (see getparam(3NEMO) and nemo(1NEMO) ) controls how the selected yapp library uses it for graphics output. For example for the yapp_ps driver it designates the PS filename, which usually defaults to but can be changed
and with the versatile yapp_pgplot interface the output can be redirected to a larger number of interactive and non-interacive devices, e.g.

However to write scripts in a portable way (semi-automatically switching devices) and incrementing figure numbers in case there are more than one, can be a bit challenging.


The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
Override for yapp= system keyword (*** = default)
Optional layout file []

Csh Examples

In the case of a yapp device that can switch between graphics output, here is an awkward csh-example (csh does not have functions) with the PGPLOT_YAPP driver , how to auto-increment your output devices:
#  before the script starts, assign two variables and initialize the $yapp
set yapps =    # yapp printf string (%d/xs,
set yappn = 1                 # first yapp number
set yapp  = ‘printf $yapps $yappn‘ ; @ yappn++   # increment counter
#  call you program that needs the yapp=$yapp argument
#  but follow it with the incrementor line
tabplot .... yapp=$yapp
set yapp=‘printf $yapps $yappn‘ ; @ yappn++
So each time a new figure is made, the set yapp= line needs to be cloned. Awkward. Lets see how this works in (BA)SH:

Sh Examples

Life in bash is simpler, since it allows functions, although they don’t return values, they simply need to echo something. For example this function can deal with YAPP_PGPLOT and YAPP_PS:
yapp() {
  if test $yapp = "xs"; then
     echo $1/$yapp
  elif test $yapp = "_ps"; then
     echo fig$
     echo fig$1.$yapp/$yapp
with this definition your code can simply do things like
   yapp=xs                 # pick ’xs’, ’ps’, ’png’, ’_ps’
   echo yapp=$(yapp 11)    # this should diplay a nice yapp= formatted

See Also

printf(1) , yapp(3NEMO) , yapp(5NEMO) , yapp_query(8NEMO) , layout(5NEMO)




Peter Teuben

Update History

03-Jul-19    Created        PJT
27-dec-2019    added bash example    PJT
14-jul-2021    example        PJT

Table of Contents