ONNET v2.0b - STEREONETS MADE EASY

Contents

Introduction

Onnet exists to make it easy to plot structural information on stereonets. The input files are designed to be easily read and editted by a user. This facilitates it's use in two ways. Field data can be plotted by making an onnet input file with the editor or programs that compute information can write onnet input files. Onnet is then used to translate these English language files into postscript which can be viewed either on screen with a postscript viewer or printed on any postscript printer. This allows you to easily edit plots. For instance you plot field data and then later you can add interpretation symbols to the plot with little extra effort. Also the symbols used to plot data, or the way it is viewed can also be changed with little effort. As the output files are in postscript, they can be read into Adobe Illustrator (or other drafting programs) for further customizing.

Here's an example input file and the output:

# put on a title
title Example 1
#
# draw a plane with dip direction = 20 and E of N and dipping 30 degrees
plane 20 30
#
# draw a small circle centered at an azimuth of 280 degrees, plunging 40 degrees
# and 20 degrees in diameter
small 280 40 20
#
# change the point size of poles to 20 points
pointsize pole 20
#
# draw the pole to the plane mentioned above
pole 20 30

Note that to present images in this WWW document I had to make the lines thicker. To see the original output try either the postscript version or the pdf version. Readers for the PDF format can be obtained from Adobe.

You should also be aware of the programs stnet and sttics that draw a standard stereonet or tics on a stereonet for use with onnet.

Onnet was written by Andy Michael while at Stanford University and was updated into the postscript writing version 2.0 at the USGS. The algorithm for small circles cribbed from Paul Layer.

Onnet was written in such a way as to make adding features easy. So if it doesn't do something you want, please tell me by sending mail to andy@andreas.wr.usgs.gov. However, remember that onnet is a plotting program. It plots data or results; it does not, and should not, perform manipulations on the data. Thus suggestions that onnet should compute rotations or contour data are not likely to be acted upon. However programs that do these could very easily plot their output by writing onnet input files.

Installation

Step 0: Obtain executable program from http://quake.wr.usgs.gov/~michael/software/onnet if one for your system is available. Otherwise go to step 1.

Step 1: Obtain the source code for onnet from http://quake.wr.usgs.gov/~michael/software/onnet. After obtaining the file you will need to uncompress it and use the tar command to extract the files.

Step 2: Onnet uses the GMT (Generic Mapping Tools) postscript subroutine libraries (version 3.3 or later). If GMT is installed on your machine then edit the file Makeonnet to point to the location of the libraries and include files. If GMT is not installed on your machine then obtain it from http://www.soest.hawaii.edu/gmt. They have made the installation process very easy.

Step 3: In the file Makeonnet edit the word gmtstuff to point to the gmt libraries on your system. Give the command "make -f Makeonnet". This should compile the code and produce the executable file onnet. To make stnet and sttics give the commands "make -f Makestnet" and "make -f Makesttics".

Step 4: Put onnet, stnet, and sttics in a directory in your search path so that you can run them from anywhere.

Step 5: If you have created an executable for a system not available on the web site and are willing to let me put it there send me email at michael@andreas.wr.usgs.gov.

Usage

The simplest usage for onnet is to put the commands into an input file (let's call it input) and create a file called output.ps with the command:
% onnet input > output.ps
output.ps can then be viewed with a postscript viewer such as ghostscript or printed on any postscript plotter.

Input files can also be specified by listing them on the command line such as "onnet input". Multiple input files can be specified and will be processed to make one plot. The order of processing goes as follows:
onnet input2 input3 < input1 > output.ps
where the files are processed in the order input1, input2, input3.

Output files are either on standard out. Errors will go to standard error.

Input Files

This section is the meat of the documentation, it tells you everything onnet can do, and how to structure an input file. Input lines in onnet files are divided into viewing parameters and commands and comment lines. Viewing parameters control how things will be displayed such as the thickness of lines or the color of symbols. Commands actually plot things like planes, poles, or lines.

The input lines can come in any order except:

Please note the following common elements in onnet input lines so that they do not need to be repeated for each command or viewing parameter.

Viewing Parameters

angle choice lower [upper]
angle sets the angle text will be plotted at for the text plotting choices such as line, pole, rake, text, and title. Lower and upper are numbers from 0 to 360 and the defaults are 0. Angles are measured counter-clockwise from horizontal. The short name is a.
color choice lower [upper]
color changes the color that the lines or symbols for the command choice to lower and/or upper. Lower and upper can be either an integer from 0 to 7 or one of the corresponding following color names: black 0, blue 1, red 2, purple 3, green 4, skyblue 5, yellow 6, and white 7. Or lower and upper can be replaced with three numbers from 0 to 255 that will be used as rgb values. For example: "color line 1" will make all later lines blue it is equivalent to "color line blue" and "color line 0 0 255". However, do not mix types of color specifications on the same line. In other words, "color line blue red" will work but I'm not promising that "color line blue 2" will do the same thing. The short name is c.
fat lower [upper]
This exists for backwards compatibility and new files should use the width command. It is the equivalent of "fatness all lower [upper]". The units are as explained for the fatness viewing parameter.
fatness choice lower [upper]
fatness exists for backwards compatibility, the preferred command is width. fatness changes the thickness of the lines or symbols for the command choice to the values given for lower and/or upper. The units are in the archaic 1/33 of an inch from the outdated Stanford Geophysics vplot plotting system. fatness no longer affects the line, pole, title, text or rake commands because these now use real fonts and not attempts to draw letters with vectors. To affect how these commands appear try the font command where you can select regular or bold fonts. The short name is f.
focal
causes all plunges after the commands to be interpreted as take-off angles which are 0 at vertical down, 90 at horizontal, and 180 at vertical up. This affects the line, text, small, move, draw, and great commands. This can be handy for plotting earthquake first motions. The default is notfocal.
font choice lower [upper]
font changes the font for the text choices such as line, pole, rake, text, and title. Lower and upper are integers corresponding to the GMT fonts. The fonts available are: 0 = Helvetica, 1 = H. Bold, 2 = H. Oblique, 3 = H. Bold-Oblique, 4 = Times, 5 = T. Bold, 6 = T. Italic, 7 = T. Bold Italic, 8 = Courier, 9 = C. Bold, 10 = C Oblique, 11 = C Bold Oblique, 12 = Symbol, 13 = AvantGarde-Book, 14 = A.-BookOblique, 15 = A.-Demi, 16 = A.-DemiOblique, 17 = Bookman-Demi, 18 = B.-DemiItalic, 19 = B.-Light, 20 = B.-LightItalic, 21 = Helvetica-Narrow, 22 = H-N-Bold, 23 = H-N-Oblique, 24 = H-N-BoldOblique, 25 = NewCenturySchlbk-Roman, 26 = N.-Italic, 27 = N.-Bold, 28 = N.-BoldItalic, 29 = Palatino-Roman, 30 = P.-Italic, 31 = P.-Bold, 32 = P.-BoldItalic, 33 = ZapfChancery-MediumItalic. If lower or upper are outside this range, it is set to 0. The short name is fo.
pointsize choice lower [upper]
pointsize sets the point size of the text plotted with the choices such as line, pole, rake, text, and title. Lower and upper are numbers and the units are points (1/72 of an inch). The short name is ps.
gray choice lower [upper]
gray acts exactly like color except that the lower and upper values are integers from 0 to 255 and this integer will be used for all three of the rgb values. For instance, "gray line 200 100" is the same as "color line 200 200 200 100 100 100". This just makes it easier to set grayscale values.
notfocal
causes all plunges after the command to be interpreted as plunges. This is the default. notfocal will rarely be called, and usually only if focal was called earlier in the file.
radius x
radius changes the radius of the plot to x centimeters. This is the most constrained command because it must come before any commands that actually draw things (e.g. plane, pole, rake, line, small, move, draw, great). You should give it at the top of the file. The default is 8 cm. The short form of the command is r.
reflect
causes all information on the upper hemisphere to be reflected about the center of the sphere and plotted on the lower hemisphere. This is the default, if neither reflect or through are specified reflect will be used. Although upper hemisphere information is reflected onto the lower hemisphere to locate it, the viewing parameters for the upper hemishpere are used. For instance, you can use different colors or fonts for the two hemispheres.
schmidt
causes the Schmidt equal-area projection to be used for all items after it is called. It is the default and will be used if neither schmidt or wulff are called.
size choice lower [upper]
size is included for backward compatibility. The prefered command is pointsize. size changes the size of the symbols for the command choice. Lower and upper are numbers and the units are 1/33 of an inch from the outdated Stanford vplot plotting programs. The default size is 3 except for the title which is 10. So to make the poles plot larger you might give the command "size pole 6". Note the default for title is 10 The short name is sz.
symbol choice lower [upper]
symbol changes the symbols used to plot the command choice. The values for lower and upper can be any single ascii character in which case that character is used or they can be one of the following words in order to plot a geometric symbol. The geometric symbols are plotted in the current color for the choice and outlined in black with the current pen width for the choice. Possible geometric symbols are circle, cross (not outlined in black), diamond, hexagon, itriangle (an inverted triangle), square, star (a five pointed star), and triangle. The circles have a diameter equal to the current point size for the choice and all other geometric symbols are inscribed into this size circle (don't ask why, that's how the GMT subroutine library does it). An attempt has been made to get the ascii characters to center properly and it works well for the default font (courier). If you need very accurately centered symbols test them by plotting a cross and the symbol at the same spot. Defaults are pole 'o' (all on lower hemisphere), line 'x' and 's', and rake '+' and '*'. The short name is sy.
through
causes all information on the upper hemisphere to be plotted as if you were above the sphere and were looking down onto the lower hemisphere. The viewing type may be changed at ANY line at the file after the title, although it is rare you will want to, so it will probably be given once (if it all) near the top.
wulff
causes the Wulff equal-angle projection to be used for all items after it is called. The projection can be changed at any time, but it is rare that you will want to, so either schmidt or wulff should be specified once at the top, if at all. The only time you might want to change within a file is if you are trying to demonstrate the effects of the two projections.

Commands

draw trend plunge
draw draws from the last point to trend plunge. It can only be given after move or draw. move and draw are useful to draw shapes onnet does not know about (yet?). The short name is d.
line trend plg
causes a character to be plotted to denote a line (i.e a lineation, magnetic pole or an end of an axis) with direction trend and plunge plg. For lines on the lower hemisphere (positive plunges) an "x" is plotted, on the upper hemisphere "s" is plotted. The short name is l.
great trend1 plunge1 trend2 plunge2
great draws a great circle segment connecting the point trend1 plung1 and trend2 plunge2. It does not do well if reflect viewing is used and the great circle segment crosses from the upper hemisphere to the lower hemisphere. The short name is g.
move trend plunge
move moves the pen (without drawing) to the point with direction trend and plunge plunge. It is most likely followed by one or more draw commands. The short name is m.
plane ddir dip
causes a plane to be drawn on the plot with dip direction ddir, and dip dip. The short name is p.
pole ddir dip
causes the pole to a plane with dip direction ddir, and dip dip to be plotted. Poles are all on the lower hemisphere and are denoted with an "o" by default. The short name is po.
rake slip_angle
rake causes a character to be plotted denoting the slip vector on a fault. Rake must come directly after either plane or pole, because the slip vector is constrained to be in the plane. rake can also follow itself to allow plotting multiple slip vectors on one plane, or w.r.t. one pole. Rakes on the upper hemisphere (thrusts) are plotted by "*", and on the lower hemisphere (normal faults) "+" is used. The slip angle is measured within the plane, on the foot wall, from horizontal such that 0 degrees represents a left handed strike slip fault. 90 is a pure thrust, 180 a right handed strike slip, and 270 a pure normal fault. These represent the standard seismology conventions. The short name is rk.
small trend plg dist
causes a small circle to be drawn with it's center at the point trend, plg with radius given in degrees by dist. The short name is s.
text trend plunge :string
text posts the string of text at the point trend plunge. The first character of the string will be positioned so that if it is a capital letter it will be centered on the given point. The string starts immediately after the colon and can include spaces (and even start with a colon). The short name is t.
title rest of line
Sets the title of the plot to be whatever is the rest of the line. The title is plotted last so it can be specified anywhere within the file, but only once. For backwards compatibility if onnet does not understand the first line of the file it becomes the title.

Miscellaneous lines

# Rest of line.
Any line beginning with a '#' is a comment line.
version
Causes onnet to put out a message about it's version number on standard error or the error file if specified.

Examples

Try copying the following into a file and play with it. It should give you an idea of onnet's capabilities. Afterwards is what should come out.

title Much of Onnet
through
radius 5.
line 20 30
line 20 -20
# a meaningless comment line
symbol line 1 2
fatness line 3
line 30 30
text 30 30 :label this point
line 30 -20
pole 45 60
size pole 8.
color pole 3
pole 45 20
reflect
fat 0
plane 190 45
fatness rake 3
size rake 5.
rake 260
small 340 10 15
through
small 320 10 15
great 180 10 200 30
move 270 20
draw 280 10

Note that to present images in this WWW document I had to make the lines thicker. To see the original output try either the postscript version or the pdf version.

Another example comes from my own work. Here is the file:

fatness circle 1
fatness plane 1
fatness rake 2
r 5.
fatness title 3
title Slickensides
p     135.00      61.00
rk     -80.00
p     126.00      59.00
rk    -100.00
p       0.00      80.00
rk     -58.00
p     322.00      68.00
rk     -78.00
p     315.00      63.00
rk     -78.00
p      20.00      88.00
rk     -59.00
p     344.00      78.00
rk     -65.00
p     136.00      60.00
rk    -100.00
p     347.00      61.00
rk     -94.00
p     157.00      56.00
rk     -88.00
p     139.00      70.00
rk    -111.00
p     306.00      50.00
rk     -94.00

Note that to present images in this WWW document I had to make the lines thicker. To see the original output try either the postscript version or the pdf version.

Future Features

The following are already on the list to be added. But, they've been there for a long time so feel free to let me know if you really want them.

Auxiliary Programs

Two auxiliary programs are useful for drawing the standard great and small circles on a stereonet or for adding tics to a stereonet. Each program creates onnet input files.

stnet

Stnet is a program for making a standard stereonet with planes striking N-S and small circles about the horizontal N-S axis. Stnet makes onnet input files and can be used in conjunction with your own input files.

Usage

The usage is: stnet [options] where the options are:

The output goes on standard output and the errors are on standard error.

The best way to learn about stnet is to just try it and pipe the output into onnet and view the results. A useful feature is that if your onnet input commands for a plot are in a file called "myplot" then you can overlay them on a standard stereonet with the command
stnet | onnet myplot

sttics

Sttics is a program for making a tics on a stereonet. Sttics makes onnet input files and can be used in conjunction with your own input files.

Usage

The usage is: sttics [options] where the options are:

The output goes on standard output and the errors are on standard error.

The best way to learn about sttics is to just try it and pipe the output into onnet and view the results. A useful feature is that if your onnet input commands for a plot are in a file called "myplot" then you can overlay them on a the tic marks with the command
sttics | onnet myplot