DIG Manual

Contents:

Starting Dig

If Dig has been installed according to the instructions, you can either

Arguments

Dig accepts the following arguments
Arg Meaning
-m Default to move rather than draw when reading commands
-c config-fileRead file containing configuration data. See Config file

Mouse gestures

Zooming:

Panning


Buttons

Zoom In
Zoom in on the centre by 50%
Zoom Out
Zooms out by 50%
Show All
Shows all data ("zoom extents")
First
Returns to the first "wait". Re-reads the dig file
Prev
Moves back to the previous "wait"
Next
Moves to the next "wait"
Last
Moves to the last "wait"

Menus

File

Reload
Re-reads the file
Open
Puts up a dialog box in which a new dig file can be selected
Find
Search for a labelled point ("LP" command) or dataset identified by a legend ("L" command). The panel is zoomed onto the label/dataset.
Save image
Save the main panel as an image - JPG, GIF etc. NOTE: The file type MUST be specified, to indicate image format. Eg enter "img.jpg" for jpeg encoding
Close
Exit dig

View

Show Axis
Show/Hide the axis lines
Square Aspect
Force the x and y axes to use the use the same aspect ratio. So a square appears as a square, not a rectangle
Auto Aspect
Automatically "Show All" when doing a First/PrevNext/Last
Show Labels
Show/Hide labels on labelled points (("LP" command)
Show Grid
Show/hide an axis grid behind the data. The grid stays the same size until it is switched off. This can give an idea of changing scale when using animation or zooming
Show X Zero
Force x = 0 to be included in plot
Show Y Zero
Force y = 0 to be included in plot
Lat Long
Interpret all coordinates as latitude and longitude (effectively swaps X and Y). Also forces square aspect
Show Legend
Display or re-display legend box

Commands / File Format

Dig files can contain any number of data sets. Datasets a drawn using a "style" which specifies the line colour and marker used.

Styles can be set in a number of ways. Standard styles use one of about 10 selected colours, and one of 5 marks. Default styles are numbered 0 to 50.

Style commands (S, S2, S3, C, K) should be the first commands for a dataset. Legend ("L") should appear next.

A blank line indicates (and is required for) a new data set. Unless other style commands are used, the next standard style is used to display the dataset.

In the following, parameters enclosed in quotes (e.g. "

Commands:

S <style>
Set style for dataset (colour and mark) using a standard style.
S2 <c> <m>
Set style using standard colour c and mark m
S3 <c> <m> <k>
Set style using standard colour c, mark m, and stroke (line or dash) k
D <x> <y>
Draw to (x,y) from the previous position (set by M or D)in the current colour. Places current marker at (x,y). If no previous M or D this dataset, equivalent to an "M"
M <x> <y>
Move to x,y. Place current mark at (x,y).
MD <x1> <y1> <x2> <y2>
Draw a line between (x1,y1) and (x2,y2). Equivalent to M x1 y1 D x2 y2
<x> <y>
Equivalent to "D <x> <y>". That is, the "default" command is Draw.
K <mark>
Select marker for current style. Use an integer for mark. (K 0: no marker)
C <r> <g> <b>
Set the colour for current style. r,g,b in [0,1] set the level of red/green/blue
L "<label>"
Set the legend for the dataset. It appears in a frame separate to the main panel
H "<title>"
Set the graph heading or title
T "<text>"
Write text in the text area. This the box below the main graph area.
X "<xtitle>"
Set x axis label
Y "<ytitle>"
Set y axis label
LP <x> <y> "<label>"
(Labelled point) Mark point (x,y) and draw a label (location is at the lower left-hand corner of text)
O <x> <y> <diam>
Draw a circle with centre at (x,y) with diameter diam in pixels
OW <x> <y> <diam>
Draw a circle with centre at (x,y) with diameter diam in world coords
B <x> <y> <wid> <hgt> <c>
Draw a box with corner (x,y) and given width and height coloured with colour c from the standard colours
BC <x> <y> <wid> <hgt> <r> <g> <b>
Draw a box with corner (x,y) and given width and height coloured with colour given by (r,g,b) with r,g,b in [0,1]
<blank line>
Start new dataset (with a new style)
W
Wait. User must use "Next" button to proceed. This gives a simple animation ability. Usually followed by WIPE, and then a re-draw of the screen
WIPE
Wipe (remove) all datsets
BW <x> <yMin> <y20> <yMedian> <y80> <yMax>
Draw a box-and-whisker plot . A line is drawn from (x,yMin) to (x,yMax). A box is drawn around the (x,y20) to (x,y80). A mark is placed at (x,yMedian).
BWC <label> <yMin> <y20> <yMedian> <y80> <yMax>
Draw a box-and-whisker using categories. As for BW, but a category label is supplied instead of an x value.
XC "<label>" <y>
Draw a line with X category (labelled) data - equivalent to a "draw" with labels instead of numbers.
XCM "<label>" <y>
As above, with move instead of draw.
YC <x> "<label>"
Draw a line with Y category (labelled) data - equivalent to a "draw" with labels instead of numbers
YCM "<label>" <y>
As above, with move instead of draw.
XT <x> "<label>"
X tic label. On the X axis, instead of the number 'x', the given tic label is used.
YT <y> "<label>"
Y tic label - as for X tics
LATLONG
Lat/long coords Force all coordinates to be read as latitude and longitude (effectively swaps X and Y). This setting applies for the whole file. It should appear before any coordinates (e.g move or draw commands)

Keyboard shortcuts

Command Shortcuts
Next N, <space>, keypad '+'
Prev P, <back-space>, keypad '-'
First R, <home>
Last L <end>
Show All A
Zoom in I (letter i)
Zoom out O (letter o)
Toggle "Show Labels" B
Toggle "Show Axis" X
Pan up Up-arrow
Pan down Down-arrow
Pan left Left-arrow
Pan right Right-arrow
Next, 10 times Page-down
Prev, 10 times Page-up
File->Find F
File->Same ImageS

Config file

The config file can be used to pre-specify some display options. Most options correspond to the name in the View menu. Each takes a boolean argument. The format of the file is configItem value For example showAxis false Config items can also be specified on the command line, e.g. dig showAxis=false file.dig
Config itemDescription
ShowAxis Initial value of Show Axis in View menu
DrawGrid Initial value of Draw Grid in View menu
ShowLabels Initial value of Show Labels in View menu
ShowXZero Initial value of Show X Zero in View menu
ShowYZero Initial value of Show Y Zero in View menu
SquareAspectInitial value of Square Aspect in View menu
AutoAspect Initial value of Auto Aspect in View menu
DefaultMove Default to move rather than draw in input files