# Geological stereonets

This tool allows to create stereonets representing geological plane and axis/slickenline attitudes as great circles, poles, faults with slickenlines and T-L diagrams. Its interface is represented in Fig. 1.
Fig. 1. Stereonet interface.
To plot data in a stereoplot, there are three main steps to follow:

- Choice of input data
- Definition of plot style
- Data plotting

### Choice of input data

It is possible to use input data from data stored in a point layer (Layer tab, Fig. 2) or to use text input (Text tab, Fig. 3).

#### Input from point layer

When using a point layer already loaded in the TOC, plane and/or axis attitudes are defined via the fields storing their values (Fig. 2). If there is a selection, only selected features will be used; the stereoplot (and, if enabled, the depth/Z histogram) is automatically redrawn whenever the layer's selection changes, so it always reflects the current selection (or the whole layer, if nothing is selected).
Depending if you want to plot planes, lines/axis of faults with slickenlines, you have to define accordingly the source fields for the various data type: for instance, for faults and slickenlines, you have to define plane dip direction and dip angle, and rake or (line trend, dip and movement sense).
Remember that rake information takes precedence over (shadows) line trend/dip and optional movement sense, even if you want just to plot data as planes and lines, not just as faults with slickenlines.
Fig. 2. Interface for input from point layer interface.
To plot faults, the movement sense or the fault rake must be also defined. Since the current (incorporated) version of apsg do not explicitly support pure transcurrent faults, pure left- or right-lateral movements are not treated, unless when movements are entered as rakes, in which case apsg-problematic values (0° and +/-180°) are slightly tweacked.
The movement sense may assume two values: "N" for normal faults, and "R" for reverse faults.
The other option to define faults is by defining a field storing the rake values.
The rake should follow the Aki and Richards (1980) convention:
0° < rakes < 180° for reverse movements;
0° > rakes > -180° for normal movements.
When using rakes, slickenline trend and plunge does not need to be explicited.
Moreover, when defined, rake values take priority above any defined trend-plunge and movement sense values (if present).
If the layer geometry is 3D (has Z), point elevation (Z) is used automatically for the depth/Z histogram and no extra field is needed; otherwise, a "Depth/elevation field" can be chosen (Layer tab) to enable it.

#### Input from text

The input can be inserted into a text window (Fig. 3), defining if data consist of:

- planes
- axes
- planes and axes
- fault planes with slickenline trend, plunge and movement sense
- fault planes with rake

Another option to take care of for plane data, is whether orientations are expressed using dip direction or RHR strike.
Fig. 3. Input from text interface.

### Plot style

Styles can be defined for great circles and poles (color, width/size, line/marker style, and transparency), and, separately, for the P-T axes and for the tangent lineation (Hoeppner) diagrams: P axis color, T axis color, shared marker style/size/transparency for P-T axes, and color/marker style/size/transparency for tangent lineation (Fig. 4).
Settings are stored in memory and re-used in subsequent sessions.
Fig. 4. Plot style interface.

### Stereonet plotting

Plots can use a new or a pre-existing stereonet plot. Previous plots can be erased by using the button Clear stereonet (see Fig. 1).
Plane can be plotted as great circles or as plane normals, axes as poles or as normal great circles, faults with slickenlines as great circles with arrows or alternatively as T-L (tangent lineation, Hoeppner) diagrams, and, for faults with slickenlines, also as P-T axes (Fig. 5).
Fig. 5. Stereonet plot interface.

### Canvas rectangle live filtering

The Link canvas rectangle button (Fig. 1) lets you draw a rectangle on the QGIS map canvas and see, live, the stereoplot (and, if enabled, the depth/Z histogram) of only the point-layer features falling inside it. After clicking the button, drag on the canvas to draw the rectangle; drag again inside it to pan it, and use Redefine rectangle to draw a new one from scratch. The plot updates automatically while the rectangle is moved or resized.
This live view opens in a separate, always-on-top floating window, so it can be kept visible side-by-side with the QGIS canvas while you interact with the rectangle. It is independent from the main stereoplot window: the latter is not affected by the rectangle and keeps showing the "regular" dataset (the whole layer, or the current selection - see above), so you can compare the overall fabric against whatever sub-area the rectangle currently covers.
The floating window closes automatically when Link canvas rectangle is toggled off (or when closed manually, which also turns the button off), and requires a point-layer input (not text input).

### Depth / Z histogram

When the input point layer has 3D geometry (Z) or a depth/elevation field has been chosen for it (see above), the Depth histogram checkbox becomes available. When checked, the canvas-linked floating window (see above) also shows a vertical depth/Z histogram next to the stereoplot, comparing:

- the local distribution (solid bars): depth/Z values of the features currently inside the rectangle, as a percentage of that local count;
- the total distribution (dashed line): depth/Z values of the whole layer, as a percentage of the total count, for reference.

The vertical axis range is fixed for the duration of the rectangle-linking session: it is computed once, from the whole layer's depth/Z range, and rounded outward to a round step, so it does not rescale as the rectangle moves. The horizontal (percentage) axis is likewise fixed from 0% to 100%.
The axis orientation and label adapt to the data source: for 3D-layer Z values, the axis is labelled "Z" and follows the natural sense (most negative/deepest values at the bottom); for an explicit depth field, the axis is labelled "Depth" and follows the positive-down convention (larger depth values at the bottom).
-----
Doc version 2026-08-02, by Mauro Alberti - alberti.m65@gmail.com