http://wrap.warwick.ac.uk/
Original citation:
Chown, P. (1990) GROVER : a graph plotting program for Sun workstations. University of Warwick. Department of Computer Science. (Department of Computer Science Research Report). (Unpublished) CS-RR-162
Permanent WRAP url:
http://wrap.warwick.ac.uk/60857
Copyright and reuse:
The Warwick Research Archive Portal (WRAP) makes this work by researchers of the University of Warwick available open access under the following conditions. Copyright © and all moral rights to the version of the paper presented here belong to the individual author(s) and/or other copyright owners. To the extent reasonable and practicable the material made available in WRAP has been checked for eligibility before being made available.
Copies of full items can be used for personal research or study, educational, or not-for-profit purposes without prior permission or charge. Provided that the authors, title and full bibliographic details are credited, a hyperlink and/or URL is given for the original metadata page and the content is not changed in any way.
A note on versions:
The version presented in WRAP is the published version or, version of record, and may be cited as it appears here.For more information, please contact the WRAP Team at:
-Research
report
162
GROVER:
A
GRAPH PLOTTING PROGRAMFOR SUN WORKSTATIONS
PAUL
CHOWNVLSI
Architectures Group(RR162)
The report is a manual for the GROVER plotting package, which provides a facility for users for a Sun Workstation to manipulate numerical data in graphical form. The interface to GROVER is in the form of an interpreted command language, allowing interactive manipulation of two dimensional graphs generated from a
variety of data formats. The interface can be operated from a standard character terminal although access !o a Sun workstation enables the effects of commands to be seen directlv.
Department of Computer Science University of Warwick
Coventry CV4 7AL
A
groph plotting
progrom for
Sun Workstotions
Poul
Chown
VLSI
Architectures
Group
ABSTRACT
This report is a manual for the CROVER plotting package, which provides a facility for users of a Sun Workstation to manipulate numerical data in graphical form. The interface to CROVER is in
the form
of
an interpreted command language, allowinginteractive manipulation of two dimensional graphs generated
from a variety of data formats. The interface can be operated from
3
3
4
5
5
6
6
8
17
3
4
t9 t9
21
B
b
zl
CONTENTS
Introduction
l.l
Bockground
1,2
NototionGROVER
documentotion
2.1
Invocotion
2.2
Environment Voriobles2.3
Explonotionof
TermsCommond Longuoge
SunView Environment
Appendix A - Attributes
I
GlobolAttributes
2
Locol AftributesAppendix
B-
Error MessogesAppendix
C-
Post ProcessorsGLASER
@nc
Introduclion
I
.l
- Bockground
GROVER was
written
in
the spring and
summerof
7989to
fill
a
needwithin
the VLSI Architectures
Group
for
a tool
to plot
the
results of
simulations being carried
out
using the SPICE package. Since a reasonableamount
of
time had
beenset
asidefor
this
project,it
was decided
to implement a tool thatwould allow
data samples to be plottedin
a range ofstyles
in
a flexible and interactive fashion.The
plotting
requirementsfor
a
number
of
measurements takenat
the same timefrom
a given system can befairly
complicated. For example aSPICE simulation of a simple inverter
would
typically producetwo
setsof
data, one
for
the
input signal and
one
for
the
output
signal.
For
theremainder
of
this document,it
\rill
be assumed that the data consistsof
anumber of such 'sets'. Each
of
these setswill
be referred to as a data 'trace'. Toreturn to
the inverter simulation, each measurementin
a data trace isrepresented by a pair
of
numerical values, one being a time value and the other a voltage value. Aswell
as being able to produce a voltage-time plotfor
eachof
these 'traces'it
would
be niceto
be ableto
plot
one voltageagainst
the other
to
obtain
a
voltage
transfer
curve
for
the
inverter
(assuming that the simulation was a
low
frequency one).It
waswith
this type of data manipulationin
mind
that GROVER was written.The
wide availability
of
Sun Workstationswithin
the Computer Sciencedepartment made them a natural choice
for
the implementationof
such atool.
Sincethe
major
windowing
interface available
at
the time
wasSunView,
this
was chosen as the environment underwhich
the packagewould
be
implemented.With
hindsight,
it
would
probably have
been more expedientto
basethe
packageon
the XWindows environment asthis has gained more widespread acceptance.
A
future version of GROVER may include this upgrade.Since
it
was written, GROVER has beenfairly well
usedwithin
the groupfor
a varietyof
applicationsand
has shownthat
the additionaleffort
toimprove
flexibility
of
the
user interface was time
well
spent.
TheI ,2
-
Nototion
When
examplesof
program dialogue are
given within this
document, theywill
be printed using a Courier typeface such as :This is an
exampleWhere an interaction between GROVER and a user
is
to be emphasized, the parts of the dialogue supplied by the userwill
be emboldened :Do
you
realJ-y want to quit
?
y sParts
of
GROVER commandsand
parametersthat
are containedwithin
the main body of the text
will
simply be emboldened.F-:
UW@
Overview
This section describes the user interface
to
the GROVERplotting
packageas it
is
currently
implementedfor
the Sun Workstation. The package isintended
to
operate
primarily under
the
SunView windowing
environment
but
may
also
be
used effectively
from a dumb
terminal whena
suitablehard
copy deviceis
availableto
produce the graphicaloutput. Sections
Two
and Threewill
describe the user interface assumingno
more functionality
than
that
available
from
a
standard
terminal.Section Four
will
describe the additional features that are made availableby
the SunView interface2,1
-
Invocotion
The program is invoked from a UNIX shell
in
the standard way, by issuing a commandof
theform
:grover t -d I t -f file_name I
[data_file_name]
The program
will
theninitialise itself taking
advantageof
the SunViewenvironment
if
suchis
available. Commands may be issuedto
GROVERto
generatea plot
or
multiple
plots, display
and manipulate themin
aSunView
window
(if
available)md
save them to a file ready to be printedon
a
laserprinter
or
plotter.
Commandswill
normally
betyped
into
a characteroiented interpreter, although certain
common operations aremade available
through the
mousewhen running
GROVERunder
aSunView
environment.The
-d
argumentis
usedto
specifythat
a 'dumb' interactionis
requiredwith
theplotting
program i.e. noplotting
canvas or corunandwindow
areto
be
generated evenif
the
program
is
running
under
SunView. Thismode
is
the only
mode available when the program
is running on
astandard terminal, and so the -d option need not be given in that case.
The
-f file_name
option
is
usedto
specify afile
from
which commandscan be read instead of reading them from the standard input device.
In
thisThe last option,
data-file-name,
is
the nameof
thefile
fromwhich
trace datais to
be read.It
is not
absolutely necessaryto
specifythis on
the command line as data can also be loaded interactivelyby
using GROVER commandsbut
it
may be desirable when operating the packagein
a non-interactive mode. The data file formats that are acceptable by GROVER aredescribed in a later section.
2,2 - Environment
Voriobles
The GROVER package uses several environment variables
to
initialise
itself
and to locate certain special files. The valuesof
these variableswill
need
to
be setby
the
userthrough
the
environment variable interfaceprovided by the login shell. This should be done before
running
GROVER.The names of these variables and their functions are defined as follows :
GROVER_DIR
is
used
to
specify
an
initial
directory
for
GROVER to changeto
before entering the command interpreter.If
no
value isspecifed then no directory change
will
take place.GROVER_INIT
can
be
used
to
specify
a
start-up
file
of
GROVER commands that are to be executed before the command interpreteris
made availableto
the
user.This
start-upfile
may
contain anyvalid
GROVER commands,for
exampleto
setup
commonly usedmacros or default plot settings.
GROVER_HELP
specifies
the
file
containing
help
information for
GROVER.
If
anyof
these environment variables arenot
defined when GROVER is invoked then no errorwill
be produced, and no actionwill
be taken. They are theresimply to allow
controlover
the program before the command interface becomes active.2,3
- Explonotion of
TermsThe GROVER program
currently
obtains the datato
be plottedfrom
anASCII data
file
containing records of the form :<name>
<fieldl>
<field2>
The name
of
the recordis
usedto group
the record togetherinto
traces,each
of
which contains a setof
information about a given data stream orfeature. The trace may be accessed
within
the packageby
specifying thiscommon name.
For
exampleall
recordswith
the
nameprobel
may containtwo
fieldswith
thefirst field
containing the voltage value and the second containinga
current value
for
a
given
point
in
time,
which
isunspecified.
GROVER requires
that
all
data tracesin
theinput
have the same numberof fields, and that the attribute represented by each field be the same across
all
traces. Thusif
trace 1,field
1 represents time, then trace2, field
L must also represent time.It
may be the case that more fields are specified thanare required
by
any one data trace,in
orderthat
the above conditions besatisfied.
If
this
is
the case then some fieldsof
some data traces may befilled with
zeroes (or any other meaningful value).It
is a simple matter tomodify
GROVER so thatit will
accept data files in formats other than the one described here, and information onhow to
do this can be obtainedfrom
Paul Chown at the Universityof
Warwick. Thecurrent format has proved sufficient
to
satisfy
our
demands
on
theprogram
but
other meansof
obtaining data may beuseful
(for
examplethe direct
acceptanceof file
formats generatedby
other tools
such
asSPICE).
Control over the format, layout
and axislimiting
valuesfor
a
graph
isaccomplished
through
the
useof
attributes,
eachof which is
used to controla particular
featureof
a plot.
There aretwo
typesof
attributes,global
attributeswhich
define package-wide features (such as the number of fields in a record), and local attributes which define the characteristics ofthe
individual plots
producedby
the package.Control over
attributes isr:n
ll
lnrirArA
U UUU
\9\=
Commond
Longuqge
Control over the generation and manipulation of plots
within
GROVER isachieved
through
the
use
of
a
command
language, assistedin
theSunView environment
by
useof
the
mouse. The command language isfairly
smallbut
the useof
such a structure allowsrapid
modification anddevelopment
of
the
program.
Input
to
the
commandinterpreter
may comeeither
directly from the
user
(typing
commandsat
the
GROVERprompt)
or
from
afile. In
thelatter
case, thefile
being executed may beeither
a
start-up script,
a
complete
sessionscript (i.e
no
userinput
isrequired throughout
the execution),or
a
GROVER scriptwhich
may beinvoked
from within
the
GROVER interpreter,returning control
to
the user when the script has terminated.As
has already been described,plots within
GROVER are formed fromelements
of
the data traces that have been read from a data file. Once theplot has been specified correctly,
it
becomes a member of a structure called theplot list,
which contains the definitionsof
all
currently defined plots.When the
plot is
created,it
will
takeon a form
definedby
the defaultvalues of the
plot
attributes. These defaults may be set by the user through the command language. Once defined, theplot
attributes become local tothat
plot
and may bemodified
independantlyof all
other plots. Theplot
that is being modified/examined is called the current
plot
and this may be changed as desired. Once aplot
has been definedit
can be saved to afile
ina
genericform
readyfor
post
processorsto
produce device specificplot
files.
The following
pagescontain
descriptions
of
the
commandsthat
areavailable to the user,
in
alphabeticalorder.
Each entry specifies the syntaxof
the command and its arguments and is followed by a descriptionof
the action that is performed.It
should be noted that the command language iscase Sensitive
-
all
commandsshould be typed
in
lower
case unless otherwise specified.ollplot
Produces one
plot for
eachof
the data tracescurrently
held by GROVER Eachplot
produced makes useof
the default attribute valuesin
the same way as thenormal
plot
command. The useof
this command is equivalentto
typing
"plot
<tracename>"for
every available data trace. When a largenumber
of similar
traces are to be displayed as is often the casewith
VLSIsimulation results, the
allplot
command can save alot of
typing.qllsqve
In
the sarneway
asallplot
will
produce aplot for
every data tracewithin
the system, allsave
will
produce a file for eachplot
containing a definitionof
thatplot
in
a device independant form. For eachplot,
the filename thatis
generatedby this
command isof
theform
"grv.<plotnum>". Thepost-processing packages Ere
written
to look
specificallyfor
filenamesof
this form.qttribs
Produces a
list of
the attributes that are currently availableto
the user fordisplay and alteration using the show, set and
default
commands (q.v.).The attributes are used to provide conkol over the layout and scaling of a
plot. Before any plots have been produced the list
will
consist solely of theglobal attributes. When a
plot
has been defined, however, thelist
will
beextended to include attributes local to the currently active plot. For a list of attributes and their functions please refer to Appendix A.
cleqr
Deletes
all
currently
defined plots and clears theplotting
canvas withoutdeleting
the
data trace information
from
memory.
If
the data
trace informationis no
longer required and can also be deleted then theflush
command (q.v.) can be used.
dqlq
Produces
a
list
of
the
data traces currentlyheld
in
memory. The namesgiven
by this
command are those recognisedby
theplotting
commandsand should be referenced exactly as they appear.
If
no data is present when the commandis
issued then the message"No
Data"will
be displayed inplace of the list.
defoult <ottribute_nqme) = (velue>
Sets the default value
for
local attributes to the given value. The value setby
this
commandis
the value
givento
the attribute when anew
plot
iscreated. Subsequent modification
of
the local attributewithin
anyplot
will
not
affectthis default.
For
example,to
superimposea
grid on
all
plotscreated in future, issue the command :
default srid :
Lexec
<filenome>
Executes a
script containing
predefined GROVER commands as though they had been typedin
at the keyboard. The exec command itself may not be usedfrom
within
a script
file
(i.e. recursively). The pathnamefor
thefile
to be executed must be specifiedif it
is not to be foundin
the current directory, as no search path mechanism has been implemented to date.flush
Resets GROVER
to
a
state
almost asthough
it
had
just
been invokedwithout
specifyinga data file.
All
dataand
plots
are
deletedand
theplotting
canvas is cleared. The default athibute values arenot
restored totheir original state, however.
In
addition to
this, thefile
specifiedby
theGROVER_INIT environment variable
is
not
re-executed when theflush
command is issued. Theinitialisation
file
can be re-executedif
necessaryby using the exec command.
gofo
<plolnumber>
Set
the currently active
plot
to
be
<plotnumber>.
Eachplot
has
an identifying numberwhich
is displayedin
the plot list. Theplot list
may bedisplayed using the
list
command (q.v.).lf
a new plot is defined thenit
isappended
to
the endof
the
plot list
and automatically becomes the newaitive
plot. The activeplot is
the one whose local attributes are operated onby
the variousattribute
manipulation commands.help
Displays help
information
for
GROVER. The message thatis
displayed isoUtiin-ea
from the
file
specified
by
the
GROVER-HELP environmentvariable. The message
will
typicatly be alist of
the available commandsand the attributes
that may
be accessed through them. Thehelp
facility
should be extend"ed to be more selective and to provide more detailed help
on
the useof individual
commands. This hasnot
been doneto
date asthere has not been suuficient demand to justify the work required.
FI
Lists
all
of
the currently defined plotsgiving
anidentification
number for eachand
a
description
of
theplot.
This description
is
given
using thesyntax
of
a completeplot
command andin
order
to
understand the plot description, the readeris
referredto
thedefinition
of
that
command. Atypical entry
in
theplot list
takes the followingform
:t 1l -
v1,.2
vs v2.2 for all field
1This example indicates that
tace
v1,field
2(field
2 isin
this case voltage)is
beingplotted
as the y-axis against the voltagev2
as the x-axisfor
all common valuesof
field
1 (in this case time). This example could therefore be specifyinga
Vin
vs.Vout
plot for
a semiconductor device. When thelist is
displayed,
the currently
active
plot
is
indicated
by
an
asteriskimmediately
to
the
left of its
identifying
number.The
activeplot is
the plot whose local attributes are accessible to the user at that time.lood
<filenome>
Loads a data
file
of
the given narne from disk.If
data is already present in memory, then GROVERwill
interrogate the user to seeif that data may
beoverwritten.
A
'no'
reply
at
this
stagewill
leave
the
resident
datauntouched.
If
new
datais
loaded thenall
of
theold
data, andany
plotsthat were created using lhat data,
will
be lost. Thisis
because there is noguarantee that the
two
sets of data are compatible andallowing
them to beloaded at the sarne time may cause confusion.
If
it
is necessary to produce graphs combiningfwo
setsof
resultsfrom different files
then this shouldbe
performed
under
LINIX
beforeloading
the data
into
GROVER. Byperforming this operation externally the meaning
of
the data can be takeninto
account
more readily.
The user should
be particularly
aware ofgenerating inconsistent data
-
for
examplecombining
two
data
sets containingtime
information but havingdifferent time origins or
units.mocro
mocro delele
"mqcro'
mqcro
"mctcro'
=
"€Xponsion'
Before user commands
are
passedto
the GROVERinterpreter they
areprocessed
by
an
elementary
macro pre-processorwhich allows
simplestring substitutions
to
be performed. One possible useof
thisfacility
is tospecify more descriptive names for constants that are
in
regular use. As anexample the specification
of
a new plot requires that a specificfield
must be selected from a data tracein
the followingway:
prcbel
.3where
field 3
is
the
field
that
correspondsto
the voltage value
of
theparticular
data tracein
question. Using the macro pre-processorwe
candefine a macro
for
thefield
number:ma:ro tvoltagerr-rr3rr
such that the above
field
specification may now bewritten
in
afar
clearerway:
probel
.voltage
Macros may be nested to 15 levels, but
it
not recommended that this many be usedin
practice asit
will
beiome verydifficult
to keep track of exactlywhat is meant on when a command is typed.
A
list ofall
currently defined macros may be obtained using the macro command onits own.
A
macromay be deleted using a corrunand of the form
macro
delete
"namet'It
may be necessaryto
override the macro processor sometimes, protectingparticular
words
or
phrases
from
being
processed.
This
can
beaccomplished by surrounding the text by quotes, as given
in
the syntax for the macro command.Although
not strictly necessary,it
is
recommended that quotes be usedin
all macro commands as thiswill
ensure that the textis
not
expandedbefore
the
commandis
executed. The useof
quotes is absolutely necessary rr'hen using the macro delete command as without the quotes the namert'ill
be expanded and the command interpreterwill
see not the name
of
the macrobut
its expansion.mqtch <plofnuml
= <Plotnum>
Forces the axes
of
oneplot
to
be equalto
thoseof
another. Thisis
usedwhere
a
particular region
of
one graph has been selectedand the
userwants
to display the
corresponding regionof
anothergraph.
It
is
alsouseful to
unify
graphs onwhich
the axes have been automatically scaled.The
plot
on the
right
hand
sideof
the assignment statementis
the oneused to provide the
new
scale, asin
conventional assignment statements.newponel
When
this
command
hasbeen implemented,
it
will
allow
additionalwindows
to
be opened onto theplotting
canvasto
simultaneous viewingof plots
that are located far apart.At
the moment theonly
way to performdirect
comparisonsof
plots that
arefar aprt
on
theplotting
canvasis
toreproduce the two plots so that they then lie side by side, or to sent them to
a
hard
copy device. Should this facilty generate sufficient demand thenit
will
be implemented.plol
<trqce>
(vs
<lroce>
(foroll
<field>
) IGenerates a new
plot
descriptor whichwill
appearin
the plot list as shownby
the list command (q.v.). The localplot
attributesfor
the newplot
areinitialised
with
the current default attribute values.If
the automatic axisscaling algorithms are selected then they are called and the results used to
set
the
axis attributes. Theplot is
then sentto
the canvaswindow
if
thepackage
is
operating under the SunView environment.The
argumentsto
the
commandprovide
a
complete descriptionof
the datathat is to
beplotted
and require a small amountof
explanation. Inorder to generate a plot
it
is necessary to know thefollowing
information :1) Which data is to be plotted along the Y axis. 2) Which data is to'be plotted along the X axis.
3) The
attribute
that thesetwo
setsof
data havein
common that allow the X and Y data values to be paired.As an example, a plot of velocity vs. distance
for
a body has the velocity of thebody plotted
along the Y axis, the distanceof
the body from the originalong the
X
axis, and the common attributeof
time. Timeis
the commonattribute due
to
the fact that thepoint
(X, Y)is
only valid
if the
distanceand velocity
measurementswere
takenat
the
samepoint
in
time.
Apossible graph resulting from this information is shown
in
Figure 1.. [image:15.595.87.522.459.768.2]r3
A
plot is
specifiedby giving
exactly thisinformation,
with
the packagefilling in
information
fiom
default valueswhen
that information is
notdireily
specifiedby
the user.In
the above example,fwo
data traces were available, Velocityind
Distance, each made upof two fields
with
the firstrepresenting
time
and the
second representingthe
value
of
the
relevantattibute
atlhat
time. The plot was produced by the command :plot Velocity.2 vs Distance.2 forall
1If
the default attributes are set correctly thenit
is possible to leave out themajority
of
this
command
and
have
te
remainder
filled
in
from
thedefault values.
In
this
wa!
r velocity and distance plots against time couldbe produced
by
thefollowing
commands :quit
Exits
from
the
GROVER package after askingfor
confirmation
from
theuser
that
the
session is-really
terminated.An
alternative
method
ofleaving
GROVER
is to
type
a
CTRL-D character
to
the
command interpreter,indicating
that nb more inputis
available.This
will
cause anexit directiy
without-querying
and so itis
recommendedthat
the
quit
command be used to avoid disasters'
rescole
Rescales the current
plot
using the default attribute values available at thatpoint
in
time. This iommand is
usefulfor
restoringthe
grap,hto
a
sanestate
after
a
number
of changes
have beenmade,
although
since the current attribute values urutr"i,
theplot
generatedmay not
be identicalto
theoriginal.
The axis attributes are setin
exactly -the same manner asthey
wouia U"
had theplot
just been created,with
the
automatic scalingalgorithm being applied
if
necessary.No
attributesother
than the
axis attributes are changed.sove
<Plot-id>
(
os <filenome>
)saves
a
specified
plot to
a
file,
with
the filename being
gel-9r?t:d automaticuiiyif
or,"
i,
not
supplie-d.- The.plot to be savedis
specified byspecifying the
plot
Ip
.".*bLi
of
the
plot
in
the
plot
list
(seethe
list
cbmmand
for
more details)'If
no filename is givenin
the commandline
then the output is placedin
afile
calledgrv.0
in
the current directory.Alternatively
a filename can bespecified using the as <filename> construct. The format
of
the output fileis
a PostScript descriptionof
theplot
using a coordinate system from 0 to1000
in
both
theX
andY
directions.It
is
envisagedthat
post-processingfilters
be usedto
groupplots
togetheron
a pageand
set scale factors/
colour
schemesfor
different devices. The PostScriptfile
producedby
thesave
command
doesnot
therefore
contain
any
of
the
page
set
up commands that are norrnally required and cannot be sent directly to a laserprinter.
set <ottribule_nome>
= <flooting_volue>
Assigns a specified value to either a local
or
a global attribute.If
the namesupplied is
thatof
a local attribute and aplot is
currently active then theattribute
for
that plot only is altered. When aplot
is created, the attributesare
assigneddefault
values.In
order
to
changethis
default value
thedefault
command (q.v.) should be used.If
an attribute
is
changed that affects a particular plot (i.e a local attribute) then that plotwill
be redrawnto
take
accountof
the
change.All
properties
of
plots are
controlledthrough
the useof
attributes.A
list of
the available attributes and theirfunctions
can
be found
in
the
relevant
appendix
at
the end
of this
document.
shift
<floolin
g-vqlue>
Shifts
theorigin of
the x-axisby
amultiple
of
the range coveredby
thecomplete x
ais.
The argument to this command is a signed floating pointvalue which
specifiesthe
direction
and
amount
of
the
shift to
beperformed. The
origx
attribute is modifiedby
adding the productof
theargument
and the x-axis rangeto
it's original
value.Although
the same operation can be achieved by modifying the attributes directly using the setcommand,
shifting the graph
is
such
a
common
operation that
this command has been added as an accelerator. As an example of its operationthe
commandshift -0.1
will
shift
theorigin
1/10thof
the currentx
range (i.e one graph division)to
the left,
equivalentto
shifting the graph
itself
to
the right
by
onedivision.
show <qtlribule-nome>
Displays the current value of a particular attribute, as defined for the active
ptoi
if
the attribute is a local one. When operating under SunView modeihe
valuesof
most attributeswill
be readily apparant,but
when operatingwithout
a
windowing
interfaceit
is
necessaryto explicitly
display
the attributes to see their values.vshift
<flooting_volue>
Exactly
equivalent
to
theshift
command,but
acting
in
theY
(Vertical)direction instead
of
the X direction.vzoom
<flooling_vqlue>
Exactly
equivalent
to
thezoom
command,but
actingin
theY
(Vertical)direction instead
of
the X direction.xlqbel
(
<new
lobel>
)Allows the current
label
for
the
x
axisto be displayed and
optionally altered.The default
axis labelling consistsof
the nameof
the
trace fromwhich the
data was obtained and thefield
numberin
brackets. The tracename is exactly as specified to the
plot
command. Thexlabel
command on itsown
will
display the current label. When followedby
a character stringit will
change replace the old axis label by that string.It
may be advisable toenclose
the new
labelin
quotesto
avoid macro expansions, andto
allowspaces to be
induded
in the label.ylobel
(
<new
lobel>
)Identical to the xlabel command, but operating on the
y
axis.zoom
<flooting_volue>
Allows
the current
plot
to
be scaledin
thex
directionwith
the centre of the x-axis as the centreof
scaling. This effectively allows the centreof
thegraph
to
be magnified
or
reducedin
thex-direction
only.
The floatingpoint
value given
as theonly
parameteris
the magnification factor, andhas a
minimum
valueof
0.1. The local attributestep-x
isdivided by
thisvalue to obtain a new
step-x
value. Thus the commandzoom
2.0
will
enlarge
the
centralhalf
of
the
currentplot so that
it
occupies the entireplotting
width.Four
SunView
Environmenl
The user
environment under SunViewis
fairly
similar to
that
availablefrom
a
standard terminal,
the
samecommand
driven
interface being provid.edthrough
awindow which
is
createdon
initialisation. Howeveriwo
additional
Ieafures are provided-
a seriesof
"accelerator" buttons tosfeed
the
application
of
common oPerations,-and a plotting
window
.r.,if,i.frdispliysall of
the plotsin
their
current form.
Commands may betyped
"t
in"
terminal window
in
the manner that
has
already beendeicribed
in
previous sections.Moving
the cursor to an accelerator buttonand
clickingbn
it
with
theleft
mousebutton
allows alimited
number ofop"tutio",
"to
b"
carried
out
more
rapidly.
The following
acceleratorbuttons are defined under the current version
of
GROVER :quit
leave the GROVER environment, destroying the windows created
by
theprogram
and returningto
the system.--A-PoP-_up
window
will
appear toconfirm that this actioliis really desired before the system is aborted.
zoom
in
zoom
in
the currentplot
around the centreline
of
the relevant axis. Twozoom
in
buttons are provided, onefor
scaling 1n a horizontal direction (H)and
theother
for
the verticaldirection
(V)'
The axisinterval
and originare
automatically alteredto
perform the
desired scaling operation' Thisbutton
performs'an operation-equivalentto
the commandzoom 2
When this button
is
used
in
conjunction
with
the other
acceleratorbuttons
there is a tendencyfor
theorigin
and step valuesfor
the axes tobecome
*or"
complex. Forthis
reason it may be necessaryto
tidy
thesevaluesupwhenthedesiredareahasbeenlocated.
zoom
ouf
the opposite action to zoom, so
zoom followed
by unzoom.should leavethe
active
plot
unaffected.As
for
the
zoom
in
buttons'
thereare
twobuttons
for'this
operationproviding control
over both the horizontal andvertical
directions'L,R,U,D
allows
the graph to be movedin
the direction corresponding to left, right, upor
down
respectively. The buttons are arrangedin
a pattern to assist inmaking
the correct selection. The operation that is actually performed is tomove the
origin
one tenthof
the axis rangein
the opposite direction. Thisgives the
impression
that the graph itself
is
moving
in
the
oppositedirection. Thus a
right
move is accomplishedby
moving
theorigin to
theleft
by
one stepunit.
Theorigin
shifts
are implementedusing
theshift
command
which
can be referencedfor
more information.Plotting
Window
The
plotting
window
isfairly
straightforward, being aview
onto a colour canvason which
are drawn the current plots as specifiedin
theplot
list. When a new plot is created,it
is allocated a new area of the canvas the sizeof which
is defined by the globa! attributesheight
andwidth.
Theplot
isthen
drawn into
this new areaof
the canvas. The creationof
a new plot inthis way
may
well
meanthat the
canvasmust be
enlarged beyond the dimensionsof
thewindow
in
which
it
is
drawn. Should this be the case,the parts
of
the canvas that are not visiblein
thewindow
may be broughtinto view by
using
the scroll barsthat
areprovided at
the'edgesof
[trecanvas
window.
The canvaswindow
may also be resizedto
show largerareas
of
the canvas or to allow different sized plots to be viewed in totality.The mouse may be used to select a particular
plot from
the canvas window and makeit
the active plot, readyfor
manipulation using text commandsor
the
accelerator buttons. To select a particularplot
simply
click the leftmouse
button within
the axesof
the relevantplot.
The 'active' indicatorin
the top
left
hand
corner
of
the
plot
should then be
illuminated,indicating
that
it
has been activated.This
light
will
always indicate thecurrently active plot in the same way as the asterisk
in
the plot list.Appendix
A
-
Attributes
The attributes
within
GROVER are the means throughwhich
the user isgiven control over the layout and
scaling
of
graphs producedby
the package. Thefollowing
pagescontain
a
list of
the
attributes availablethrough
the GROVER interface togetherwith
a descriptionof
the functionperformed
by
each. The detailsof
commandsthat
may be
usedto
setdefault and active values of these attributes are described
in
the Command Language definition of Section 3of
this document.The GROVER package has
two
typesof
attributesthat
can be accessed,global
attributesthat
specify theoverall
attributesof
the system and the dataon
whichit
is operating (numberof
fields per record etc.), and localattributes that control plots on a local basis.
In
the latter case each definedplot
has its own copyof
the local attributes that may be different from thecopies of those attributes held by other plots.
I
-Globol
Athibutes
The global attributes define various default values that are used to control the formation of plots and to
inform
the package of particular system-wide values. They arenot
usedto
control
thelayout
of
eachplot but
arestill
necessary to define the environment
in
which
those plots are created. For this reason there is only one copyof
each global attribute, the plots do notcontain copies
of
them as local valueswould
have no significance. Thus thedefaultl for
global attributes are the same as the attributes themselvesand
so they may
be setusing either
the
default
commandor
the
set commandwith
exactly the same meaning.qulo_x
This
attribute determines whetheror not
the auto-scaling algorithmis
tobe applied to the x axis when a
plot
is created. The auto-scaling algorithm examines the data beingplotted, and
uses the maximum and minimumvalues that
it
findswithin
that data to calculate an approximate origin andscaling factor for the axis along which that data is to be plotted.
The algorithm attempts
to
make the values thatit
choosesfor
the originand scale of the axis reasonable, i.e restricted to two significant figures. Due
to
numerical
inaccuracieswithin
the
calculation
this
restriction
canoccasionally lead to some points not appearing on the graph or selection of a range that is larger than
it
needs to be (e.g a range of 5.1for
data pointsranging from 0 to 5). This happens rarely and should not cause-a problem
o uto_y
This
is
the sister attributeto
auto-x,
performing the
same operation forthe
y
axis.Using
thispair of
attributesin
conjunctionwith
locai defaultsfor
origin
and
range values
allows
consistency betweenplots
to
bemaintained even though a
wide disparity
in
data values may be present.As
an example, thefollowing
commands specify that they
rangeis
to befrom
0.0to
5.0 (voltsin
this case),with
thex
axis being scaledto
match whichever values are placed alongit
:default origin_y :
0.0
default
range_y
:
5.0
3:f::1:
::i:-r
r
?fields
Defines
the
numberof
fields
that each recordof
theinput file
contains (excluding the trace label at the start of each record). For example, to load adata
file
with
records of the form<name>
<fieldl>
<fie1d2>
<field3> <fie]d4>
the
fields
attribute should be given the value 4. The number of fieldsin
arecord must
bea
constantfor
anyparticular
file,
it cannot change from
data trace to data trace or confusion
will
result when the file is read.field_x
Specifies the data field that is plotted as the x-axis on the graph when a plot
is created. This value is used as a default to
fill
in
the information whenit
is
not
supplied directlyin
the plot command. By specifying a field numberwithin
the
plotting
command this valueis
superceded.In
thisway
it
ispossible to specify only the data trace narne to be plotted,
with
this attribute(in
conjunctionwith
thefield-y
attribute)defining
which fields are to beplotted
onwhich
axis. Thefield-x
attribute also supplies the value for the commondata
field
requiredby
theplot
command.In
this way
if
just
atrace narne is supplied, then pairs of <x,y> values
will with
the values of xbeing plotted
in
increasing order.field_y
Specifies the data field that is to be plotted along the y axis
in
the same wayas the
field_x
attribute specifies the datafield
that is to be plotted along thex axis.
height
Specifies the default height
of
theplotting
area created for succeeding plot definitions as an integer numberof
pixels. Although the versions saved tofile
always use a conceptualplotting
areaof
1000 by 1000 pixels, when theplot
is actually drawn on the screenit
usually occupies a smaller area,with
perhaps a different aspect ratio.
The
height
attribute
is
usedin
conjunctionwith
thewidth
attribute
to specify the size and shapeof
that areain
the canvas. When the package is being usedthrough a
standardterminal
these attributes haveno
effect, since plots are not beingdrawn to
aplotting
canvas. These attributes alsohave no effect once the plot has been save to a file as the size and shape
of
plots as they appear on anoutput
device is defined by the post processor,not by GROVER.
width
In
conjunctionwith
theheight
attribute
already describedthis
attributedefines the area
of
the canvas that is to be used for new plots. The value ofthe attribute is an integer number
of
pixels.2
-
Locol Attributes
Local attributes are used to describe particular features of a plot, and so are not accessible
until
a plot has been defined. Before any plots are createdit
is
possibleto
setup
thedefault
valuesfor
the local attributes sothat
allfollowing
plot
creation commands
produce
acceptablelayouts.
Thedefaults may be set
up
usingthe
default
command as specifiedin the
command
summary.
Once aplot
has been defined the local variables forthat
plot
are allocated spave and initialisedwith
the default values held by GROVERat that point
in
time. the
local attribute
valuesmay
then bemodified
with
the
set
command
to
manipulate
the
graph. The
local attributes currently available are :grid
a boolean flag that determines the presence
or
absence of a grid which canbe superimposed on the graph. When the grid is enabled, ten
low
intensity lines are placed across the graphfor
each axis, enabling the exact positionsof
points
on
that
graphto
bemore
easily identified. The valuesof
grid
used to enable or disable the grid are :
0 -
No
grid
1 -
Grid
linetype
specifies the type
of
mark that is to be used to indicate the data points onthe graph. The currently available modes are :
0
-
cross
markersI
:::*i";::;.:1""
The use
of
a continuousline
tomark
the data points means that a line isdrawn from point to point as ihey are placed on the graph. GROVER plots
the data points
by plotting
successively increasing valuesof
the common datafield,
with
an <x/y> point being plottedfor
each commonfield
value.If
there is not a direct relationship between the x andy
data values and the common datafield
then the graphline
will
apparantlyleap
at
randomaround the graph despite the fact that the points themselves may
lie
on auniform
curve. Under these conditions the graph should be plotted usingpoint
markers.A
line that is drawn to apoint
outside the current axeswill
stop
at
the lastpoint
drawnwithin
the axes, andwill
not be extended tomeet the edge
of
the plotting area.origin_x,
origin_y
These two attributes locate the origin
of
the graph.In
conjunctionwith
thestep-x
andstep-y
attributes they define the scale and positioningof
theplot within
the x-y plane. The values assignedto
theorigin
attributes arefloating
point
values. Notethat
theorigin
values may be alteredby
thecommands
that shift
and
scale
the
graph.
Under
the
SunViewenvironment
the numerical valuesdefining
the
axes are displayedin
atable to the right hand side of the graph itself.
slep_x,
step_y
In
order to completely specify the mapping between the x-y plane and thegraph that
is being plotted,it
is
necessaryto
specify the positionof
theorigin
(using theorigin_x
andorigin-y
attributes) and the scalesof
thetwo
axes. The axis scales are definedby
thestep-x
andstep-y
attributes. Each axisis divided
into
10units to help
in
locating the positionsof
the points on the graph. The step attributes define the interval spanned by oneof
these units on the relevantais.
The range coveredby
the entire axis istherefore L0 times the step attribute.
This convention is a
little
strange atfirst,
but
it has been
found
thatit
ismore convenient
in
regular use than the specifying the range covered by the axis as a whole.zero
Flag controtling the display of the two lines x=0 and Y=0 on the graph
0 -
Donot display zero lines
1 - ni qnl arz zafo lineS
L uLet'Lsl
Appendix
B
-
Error
Messoges
NON-FATAL
ERRORSCannot access
file
given when the program cannot access
or
create a file. This may bedue to non-existence
of
thefile,
a problemwith
access permissions,or a larger problem
with
the system.Line too long
an input
line
has
exceededthe
limit
imposed
by
the
program(probably around 255 characters).
Macro nesting too deep
The input line caused a macro expansion to be nested beyond
its
16level
limit,
almost certainly due to a recursive macro or macro loop.Macro expansion caused
line
overflowThe expansion of a macro has caused the line length to be exceeded.
No active
plot
a corunand has been issued that requires a
plot
to be active when none has been defined.Syntax Error
This should never
really
appear asit
is
tooblunt
and meaningless.It
has been used as a temporary error message during development.Macro does not exist
a macro operation has been invoked on a macro that does not exist.
This often appears when there are no quotes around a macro string.
Not running
under SunViewa command has been issued that requires the SunView interface to
be operational, and has found that
it
is not.Athibute
does not exista corunand has been issued that has attempted to modify
or
accessan atrtibute that does not exist
within
the systemor
is not currentlyactive.
Field
limit
exceededthe maximum number
of
fields
allowable
in
a
record
has beenexceeded.
It
is not possible to break thelimit
that has been compiledinto the Program using the
fields
command.Cannot open
file
A
command that needs to open afile
has failed to open that file.Unrecognized command : ....
A
command has been enteredthat
GROVER doesnot
recognise,possibly due
to
macro expansion.Invalid
plot
numberthe
plot
number suppliedto
the
command does not correspond to any currently defined-plot.Field number out of range
the field number supplied is too large/small.
Cannot
find
trace namewhile trying
to seate aplot,
the package could notfind
a data tracewith
the name that was supplied.FAIAL
ERRORSInvalid
operating modeGROVER has entered
an
illegal
operating mode and hashad
toabort
sinceit
cannotdetermine
what
environmentit
is
runningunder. This indicates a major error
in
the code.Invalid
GROVER_DIR valueThe value
of
the environment variable
GROVERDIR
cannot bematched to a directory.
Invalid
GROVER-INIT valueThe
valueof
theenvironment
variable
GROVERINIT
does not indicate a command file.Usage : grover...
The
GROVER package hasfailed
to
interpret the
command line arguments and tries to provide some hints for next time.Cannot restore STDIN
probably indicates that a major system
limit
has been reached, such as the svstemfile
limit.Out of Memory
The package has been told to load a large data file or generate many plots such that the system has
run
out of memory to store them.Lexical Analyzer: ...
Another
error
messagethat
indicatesa
major codingerror within
GROVER and so
will
almost certainly never apPear.Appendix
C
-
Posf
Processors
Plot files generated using GROVER commands make use
of
the PostScript page layout languageto
recordpoint
and lineplotting
commands, colourchanges etc.
Within
eachplot file,
the graph is assumed to be plotted on apage that has already been set up
with
axes running from 0 to 1000in
eachof
the x andy
directions.No
page set up commands are containedwithin
the plot files and so
it
is- not possible to send aplot
file directly to the laserprinter
or
plotter. This
is
done
to
allow
simple post
processorsto
bewritten that
convert
this
genericformat
into a
suitableinput
file for
a particularoutput
device.GROVER post processors are provided that take a number of plot files and
process them
in
a variety of ways to create a device specific plotting file. In thisway
it
is
possibleto
place a numberof
plots on
the same page andperform
operationssuch
as superimposingplots
or
adding
page titleswithout
having
to
regeneratethe plots using
GROVERevery
time
thepage layout is changed.
The remainder
of
this
appendixwill
contain manual pagesfor
the
post processors that have currently been writtenfor
producingplot
layouts for particularoutput
devices. For eachof
these tools, a numberof
guidelinesare
provided
to
standardisethe
user interfaces betweentools,
and
tosimplify
their use :Naming
ConventionThe name
for
a post processor should consist of a 'g' followed by some sortof
abbreviationfor
theoutput
device thatit
iswriiten
for.
For example'glaser'or'ghpplot'.
Input
FilesSince
grover
generatesfiles
with
nameswith
theprefix 'gtt.',
invocation
of
a post processor should produce plots of all files ofthat
form that
can befound
in
thecurrent
directory,in
more than oneoutput file
if
necessary.Output Files
Output files from post processing programs should take the form
of
the
prefix 'plot.'
followed
by
an
integer
which
should correspondto
the
input
file
that
was used
to
generateit,
if
appropriate.Arguments
Any
operationdiffering
from
the standardof
oneplot
per pageshould be
selectablethrough
options
only.
For
example, thefollowing options are suggested :
-h
provide helpinformation on
options.-s
superimposethe
plots
containedwithin
the
input
files,using the axis specifications
from
thefirst
onefound
(i.e.alphabetically
first
orfirst
in
the filename list).-t
"..."put
thetitle
that is containedin
the following argument as a centred title across the top of the page-n <plots>
put
a numberof
different plots on the same page, thenumber
of
plots being supplied as <plots>. Put the plots on one above the other, rather than superimposed.-x <xsixe> specify an x-size
for
the plots produced, givenin
cm.Every plot produced
will
be this wide.-y
<ysize> specify ay size
for
theplots
produced, asin
the -xoption.
-p
<pagesize> specify the sizeof
paper that the plots areto
beplaced on (e.B
'A4','A3').
Additional
arguments thatdo not
beginwith '-'
constitute alist
of files that are to be plotted in place of the 'grv.' files.GLASER
Documentotion
GLASER
is a
GROVER post-processorto
convert genericplot files into
page layout commandsfor
an A4 Laser Printer. The syntaxfor
the GLASER commandline is :
glaser
Ioptions]
filenames.
. .If
filenames are not specifiedin
the command line then GLASERwill
lookin
the currentworking directory
to
locateall
files beginningwith
theprefix
'grv.'
and use those files to generate the Laser Printer files. The output consistsof
a numberof
files that
are
createdin
the
current directory,
generatedwith
the
names 'plot.O','plot.l',
...
with
eachfile
correspondingto
one pageof
Laser Printeroutput. The options supported
by
the current version are :-h
listsall
of
the current options-n
<plots>
rather than
producing
output files
with
one graph
per page (the default), place <plots> graphs on a page before generating the next page.-p
<size>
Change the page size to <siz,e> where <size> is specified asthe paper size name (e.9. 'A4','A3').
-s
superimposeall
graphs that are placed on one page, using the axes obtained from the first graph plotted.-t
<title>
place thetitle
<title> centred at the top of each page.-x <xdim>
-y
<ydim> Specify
the dimensionsof
the plots that are placed on thepage
(in
centimetres). The plots are normally scaledto
fit
the paper that is available,
but
that scaling is overruled by these options.As
an exampleof
the useof
GLASER, thefollowing
page was produced from adirectory
containingfour plot
files
with
the names'9.r.0' to
'grv.3'. By issuingthe
commandglaser -t "barrout Simulation I4/B/89" -n
5all four graphs are placed on the same page,scaled to
fit
one above the other, andwith
the specifiedtitle at
the
top of
the page. Theoutput
was placedin
afile
called 'plot.O' which was then sent to the laser printer.
-.2
V(clk).1
V(int).1
-.2
V(Data). 1