Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ggraph(1) — Sprite KS.390

Media Vault

Software Library

Restoration Projects

Artifacts Sought

GGRAPH  —  User Commands

NAME

ggraph

SYNOPSIS

ggraph [input file [output file]]

input fileis the ggraph input file.  If omitted, stdin is read. 

output fileis the ggraph output file.  If omitted, the file name is given in the dra command described below.  This is the preferred usage. 

DESCRIPTION

Ggraph is a program which will take points and produce gremlin files which may be displayed by gremlin or included in ditroff documents.  Ggraph takes as input ggraph files and produces SUN gremlin files.  The minimum amount of information needed is a set of X and Y coordinates.  Ggraph will automatically scale the points to fit the graph area.  Currently, four types of graphs are supported: linear (including curves), log graphs, histograms and bar graphs.  In addition all of the line types supported by gremlin are supported by ggraph.  Ggraph is currently under development and therefore new features will be added from time to time.  In addition backwards compatibility is not guaranteed at this time. 

A ggraph input file is an ASCII file containing ggraph commands and data.  Each command is on a separate line.  Blank lines may be inserted as separators with no problem.  The coordinates for the points of the graph are read as floats.  Whitespace may be used arbitrarily to seperate different elements of a line. Lastly, a semicolon is a comment character causing the rest of the line to be ignored. 

The following is a list of the ggraph commands:

Command       ArgumentsMeaning
 com<rest of line>Comment
 croon|offTurn on X/Y cross hair
 crxon|offTurn on X axis cross hair
 cryon|offTurn on Y axis cross hair
 daeData set end
 das<string>Data start
 dra<output file name>Draw graph
 firon|offFirst tick mark both axises on/off
 fraon|offFrame on or off
 frt<size #>Frame thickness
 gti<string>Graph title
 gtp<X pos> <Y pos>Graph title position
 lcu<line name> <curve type>Curve type
 legon|offTurn on legend
 lebon|offDraw box around legend
 leson/offLegend position - right side/bottom
 lla<line name> on|offLine label on/off
 llf<font #>Line label font
 lls<size #>Line label size
 llp<line name> <X pos> <Y pos>Line label position
 lof<line name> on|offLine on/off
 logon|offLog-log graph
 loxon|offX coordinates log
 loyon|offY coordinates log
 lsy<line name> <symbol #>Line symbol
 lth<size #>Line thickness
 lty<line name> <type #>Line type
 quiQuit
 rea<file name>Read a command file
 sla<line name> <string>Line label string
 sle<line name> <label>Set legend line label for a line
 slf<font #>Set legend title font
 slh<label>Set legend string
 sls<size #>Set legend title character size
 sswon|offSymbols on or off
 sun<value>Set graph units
 sxt<min X value> <max X value> <number of ticks>
Set X axis scaling
 syt<min Y value> <max Y value> <number of ticks>
Set Y axis scaling
 syz<size #>Set symbol size
 tifon|offGraph title on/off
 typ<type #>Type of graph
 veron|offY label vertical
 tft<font #>Title font
 tis<size #>Title text size
 xaxon|off|top|bottom|bothX axis on/off and position
 yaxon|off|left|right|bothY axis on/off and position
 xfion|offFirst tick mark X axis on/off
 yfion|offFirst tick mark Y axis on/off
 xft<font #>X label font
 yft<font #>Y label font
 xle<length>X axis length in units
 yle<length>Y axis length in units
 xgron|offX grid on/off
 ygron|offY grid on/off
 xgt<grid #>X grid type
 ygt<grid #>Y grid type
 xla<string>X label
 yla<string>Y label
 xpr<#> <#>Precision for X tick labels
 ypr<#> <#>Precision for Y tick labels
 xst<# of tick> [<delta> [<starting tick> [<dev org>]]]
Set X scaling (obsolete)
 yst<# of tick> [<delta> [<starting tick> [<dev org>]]]
Set Y scaling (obsolete)
 xtf<font #>Set X tick label font
 ytf<font #>Set Y tick label font
 xtp<X pos> <Y pos>X label position
 ytp<X pos> <Y pos>Y label position
 xtion|off|in|out|bothX ticks on/off
 ytion|off|in|out|bothY ticks on/off
 xtlon|offX label on/off
 ytlon|offY label on/off
 xts<size #>X label text size
 yts<size #>Y label text size
 xtz<size #>Set X tick label character size
 ytz<size #>Set Y tick label character size

There are seven line types supported by ggraph and gremlin.  They are:

BRUSH_INVISIBLE  0
BRUSH_DOT        1
BRUSH_ALT        2
BRUSH_THICK      3
BRUSH_DASH       4
BRUSH_THIN       5
BRUSH_NORMAL     6

There are four fonts defined in ggraph and gremlin.  These may be changed arbitrarily with grn when the graph is printed.  The fonts are:

ROMAN       1
ITALICS     2
BOLD        3
SPECIAL     4

There are four font sizes supported by ggraph and gremlin.  See the gremlin manual for their comparative sizes. 

SMALL       1
MEDIUM      2
LARGE       3
EXLARGE     4

There are currently eleven symbols defined.  They are:

NOSYMBOL        0
BOX             1
RING            2
CROSS           3
STAR            4
TRIANGLE        5
UTRIANGLE       6
CROSSBOX        7
STARBOX         8
DIAMOND         9
CROSSDIAMOND   10

FILES

None

AUTHOR

Ed Hunter (edh@Sun.COM)

SEE ALSO

gremlin (l), grn (l), ditroff (l), pic (l)

BUGS

N/A

EXAMPLE

The following is a simple ggraph input file:

com Sample ggraph input file
xla Repetition count                   ;set the X axis label
yla Sec                                ;set the Y axis label
gti Total time by packet count         ;set the graph title
das foo                                ;define a data set foo
500 4                                  ;data points X, Y
1000 8
5000 53
9000 82
dae                                   ;end the dataset
das bar                               ;start another dataset bar
500 6
1000 12
5000 59
9000 105
dae                                   ;end the dataset
syz 5                                 ;set symbol size to 4
dra graph1                            ;draw a graph in file graph1
sxt 0.0 10000.0 10                    ;set X axis scaling
syt 0.0 200.0 10                      ;set Y axis scaling
xgr off                               ;turn off X grid
ygr off                               ;turn off Y grid
lof foo off                           ;turn off line foo
fra off                               ;turn the frame off
dra graph2                            ;draw another graph

Sprite version 1.0  —  1 March 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026