GXMVU class¶
- class GXMVU(handle=0)[source]¶
GXMVU class.
A catchall library for methods using the
GXMAP
andGXMVIEW
classes. These include drawing flight paths, legends, postings, and special objects such as histograms and bar charts.- classmethod arrow(mview, hx, hy, tx, ty, ratio, angle, type)[source]¶
Draw an arrow.
- Parameters:
mview (GXMVIEW) – View
hx (float) – Head X location
hy (float) – Head Y location
tx (float) – Tail X location
ty (float) – Tail Y location
ratio (float) – See MVU_ARROW constants definitions for explanation
angle (float) – Angle of barbs with respect to the tail in degrees.
type (int) – MVU_ARROW constants
New in version 5.0.
License: Geosoft Open License
- classmethod arrow_vector_vv(mview, vv_x, vv_y, vv_dx, vv_dy, scale, pos, size, style, point, thickness)[source]¶
Draw arrow vectors based on input VVs.
- Parameters:
mview (GXMVIEW) – View
vv_x (GXVV) – X locations
vv_y (GXVV) – Y locations
vv_dx (GXVV) – X Vector value (can be negative)
vv_dy (GXVV) – Y Vector value (can be negative)
scale (float) – Scaling (units/mm)
pos (int) – MVU_VPOS constants
size (int) – MVU_VSIZE constants
style (int) – MVU_VSTYLE constants
point (int) – MVU_VPOINT constants
thickness (float) – Line thickness (can be Dummy)
New in version 5.0.
License: Geosoft Open License
Note: The locations are given in two VVs, and the directions in the two others. A wide range of sizes are available. If the scaling is set to
rDUMMY
, then arrows are automatically scaled so the largest is 1cm in length. If the line thickness is set torDUMMY
, the line thickness scales with the arrow size, and is 1/20 of the vector length.
- classmethod bar_chart(mview, group_name, data, line, x_chan, list, x_title, x_txt_size, y_title, y_txt_size, bar_title, bar_txt_size, bar_width, dist_fid, label, tick, right_axis, top_axis, bottom_axis, surround, left, bottom, right, top, xm, ym, widthm, heightm)[source]¶
Plot bar chart on a map.
- Parameters:
mview (GXMVIEW) – View
group_name (str) – Group name
data (GXDB) – Database handle
line (int) – Line handle
x_chan (str) – Horizontal (X) axis’ channel name
list (str) – List of channel names (comma separated)
x_title (str) – X axis title
x_txt_size (float) – Text size for X axis
y_title (str) – Y axis title
y_txt_size (float) – Text size for Y axis
bar_title (str) – Overall chart title
bar_txt_size (float) – Text size for overall title
bar_width (float) – Bar width in mm
dist_fid (int) – Distance based (1) or fiducial based (0)
label (int) – BARCHART_LABEL constants
tick (int) – Draw ticks along X axis (1) or not (0)
right_axis (int) – Draw right vertical axis (1) or not
top_axis (int) – Draw top horizontal axis (1)
bottom_axis (int) – Draw bottom horizontal axis (1) or not
surround (int) – Draw surronding box (1) or not (0) The following 4 parameters are required if drawing the surronding box
left (float) – Width in mm between left Y axis of bar chart with left surronding line
bottom (float) – Width in mm between bottom X axis of bar chart with bottom surronding line
right (float) – Width in mm between right Y axis of bar chart with right surronding line
top (float) – Width in mm between top X axis of bar chart with top surronding line
xm (float) – X in mm (bottom left corner of bar chart)
ym (float) – Y in mm (bottom left corner of bar chart)
widthm (float) – Width of the bar chart in mm
heightm (float) – Height of the bar chart in mm
New in version 5.0.
License: Geosoft Open License
- classmethod c_symb_legend(mview, x1, y1, font_size, symb_scale, file, title, sub_title)[source]¶
Plot a legend for the classified color symbols.
- Parameters:
New in version 5.0.
License: Geosoft Open License
Note: If the symbol size, color, font etc are specified in the
GXITR
’sGXREG
, then the Symbol scale factor is used allow the user to adjust the symbol sizes. They will be plotted at a size equal to the size in theGXREG
times the scale factor. If no symbol size info can be found in theGXREG
, then the symbol size is set equal to the Label Font Size. If no symbol font or number info is included in theGXREG
, it is the programmer’s responsibility to select the correct font and symbol before CSymbLegend is called. The same is true of the edge color.
- classmethod cdi_pixel_plot(mview, group, data_va, elev_va, xvv, itr)[source]¶
Create a color pixel-style plot of CDI data.
- Parameters:
New in version 7.2.
License: Geosoft End-User License
Note: Draws a single colored rectangle for each data point in Conductivity-Depth data (for example). It is similar to the result you get if you plot a grid with Pixel=1, but in this data the row and column widths are not necessarily constant, and the data can move up and down with topography. The pixels are sized so that the boundaries are half-way between adjacent data, both vertically and horizontally.
- classmethod cdi_pixel_plot_3d(mview, group, data_va, elev_va, xvv, yvv, itr)[source]¶
Create a color pixel-style plot of CDI data in a 3D view.
- Parameters:
New in version 7.2.
License: Geosoft End-User License
Note: Similar to
cdi_pixel_plot
, but plotted onto a series of plotting planes which hang from the XY path in 3D. Each vertical plane azimuth is defined by two adjacent points on the path. The color “pixel” for each data point is plotted in two halves, with each half on adjacent plotting planes, with the bend at the data point.
- classmethod color_bar(mview, itr, decimal, ann, height, width, x, y)[source]¶
Create a Color Bar in view
- Parameters:
New in version 5.0.
License: Geosoft Open License
- classmethod color_bar2(mview, itr, itr2, decimal, ann, height, width, x, y)[source]¶
Create a Color Bar from two
GXITR
- Parameters:
New in version 5.0.
License: Geosoft Open License
Note: The secondary
GXITR
is used to blend horizontally with the primaryGXITR
in each box.
- classmethod color_bar2_style(mview, itr, itr2, decimal, ann, height, width, x, y, style)[source]¶
Create a Color Bar from two ITRs with style options
- Parameters:
mview (GXMVIEW) – View
decimal (int) – Decimals
ann (float) – Annotation size
height (float) – Box height
width (float) – Box width
x (float) – X location (bottom left corner of color boxes)
y (float) – Y location
style (int) – COLORBAR_STYLE constants
New in version 5.0.
License: Geosoft Open License
Note: The secondary
GXITR
is used to blend horizontally with the primaryGXITR
in each box.
- classmethod color_bar_hor(mview, itr, decimal, ann, width, height, x, y, label_orient)[source]¶
Create a horizontal color bar in view
- Parameters:
mview (GXMVIEW) – View
itr (GXITR) – Itr
decimal (int) – Decimals
ann (float) – Annotation offset from box in mm (negative for labels below).
width (float) – Box width in mm
height (float) – Box height in mm
x (float) – X location (bottom left corner of color boxes) in mm
y (float) – Y location in mm
label_orient (int) – COLORBAR_LABEL constants
New in version 5.0.
License: Geosoft Open License
Note: The sign of the annotation offset determines whether labels are plotted above or below the colorbar. Labels above are text-justified to the bottom of the text, and labels below are text-justified to the top of the text.
See also
- classmethod color_bar_hor2(mview, itr, itr2, decimal, ann, height, width, x, y, label_orient)[source]¶
Create a Horizontal Color Bar from two ITRs
- Parameters:
mview (GXMVIEW) – View
decimal (int) – Decimals
ann (float) – Annotation size
height (float) – Box height
width (float) – Box width
x (float) – X location (bottom left corner of color boxes)
y (float) – Y location
label_orient (int) – COLORBAR_LABEL constants
New in version 5.1.
License: Geosoft Open License
Note: The secondary
GXITR
is used to blend horizontally with the primaryGXITR
in each box.
- classmethod color_bar_hor2_style(mview, itr, itr2, decimal, ann, height, width, x, y, style, label_orient)[source]¶
Create a Horizontal Color Bar from two ITRs with style options
- Parameters:
mview (GXMVIEW) – View
decimal (int) – Decimals
ann (float) – Annotation size
height (float) – Box height
width (float) – Box width
x (float) – X location (bottom left corner of color boxes)
y (float) – Y location
style (int) – COLORBAR_STYLE constants
label_orient (int) – COLORBAR_LABEL constants
New in version 5.1.
License: Geosoft Open License
Note: The secondary
GXITR
is used to blend horizontally with the primaryGXITR
in each box.
- classmethod color_bar_hor_style(mview, itr, decimal, ann, height, width, x, y, style, label_orient)[source]¶
Create a Horizontal Color Bar in view with style options
- Parameters:
mview (GXMVIEW) – View
itr (GXITR) – Itr
decimal (int) – Decimals
ann (float) – Annotation size
height (float) – Box height
width (float) – Box width
x (float) – X location (bottom left corner of color boxes)
y (float) – Y location
style (int) – COLORBAR_STYLE constants
label_orient (int) – COLORBAR_LABEL constants
New in version 5.1.
License: Geosoft Open License
- classmethod color_bar_reg(mview, itr, itr2, reg)[source]¶
Create a Color Bar in view
- Parameters:
New in version 8.2.
License: Geosoft Open License
Note: To allow for expansion, all parameters are passed inside the
GXREG
object.BAR_ORIENTATION one of MVU_ORIENTATION_XXX (DEFAULT =
MVU_ORIENTATION_VERTICAL
) DECIMALS decimals in plotted values (see sFormatStr_GS for rules) (DEFAULT = 1) ANNOFF annotation offset from bar (+/- determines side of the bar left/right and below/above) BOX_SIZE box height (mm) (width for horizontal color bar) (DEFAULT = 4) BAR_WIDTH width (mm) (short dimension) of the color bar (DEFAULT = 8) MINIMUM_GAP Minimum space between annotations, otherwise drop annotations (DEFAULT = 0 mm) The actual height is over-estimated, so even with zero gap there will normally always be some space between labels. FIXED_INTERVAL Preset interval for annotations scale (DEFAULT = DUMMY, use color zones) FIXED_MINOR_INTERVAL Preset minor interval for annotations scale (DEFAULT = DUMMY, if defined must be 1/10, 1/5, 1/4 or 1/2 of FIXED_INTERVAL) X X location (REQUIRED) Y Y location (REQUIRED) POST_MAXMIN Post limit values at ends of the bar (0 or 1)? (DEFAULT = 0) DIVISION_STYLE One of MVU_DIVISION_STYLE_XXX (DEFAULT =MVU_DIVISION_STYLE_LINES
)
- classmethod color_bar_reg_ex(mview, st_hist, itr, itr2, reg, vv)[source]¶
Create a Color Bar in view
- Parameters:
New in version 9.10.
License: Geosoft Open License
Note: See
color_bar_reg
. This is the same except for the additional Ranges VV parameter. The VV is not part of the REG object, it contains the interval values for the exact interval option from an ASCII file.See also
- classmethod color_bar_style(mview, itr, decimal, ann, height, width, x, y, style)[source]¶
Create a Color Bar in view with style options
- Parameters:
mview (GXMVIEW) – View
itr (GXITR) – Itr
decimal (int) – Decimals
ann (float) – Annotation size
height (float) – Box height
width (float) – Box width
x (float) – X location (bottom left corner of color boxes)
y (float) – Y location
style (int) – COLORBAR_STYLE constants
New in version 5.0.
License: Geosoft Open License
- classmethod contour(mview, con, grid)[source]¶
Creates a contour map.
- Parameters:
mview (GXMVIEW) – View
con (str) – Control file name
grid (str) – Grid file name
New in version 5.0.
License: Geosoft Open License
- classmethod contour_ply(mview, ply, con, grid)[source]¶
Creates a contour map with clipped areas.
- Parameters:
New in version 5.1.6.
License: Geosoft Open License
Note: The clipping
GXPLY
can include a surrounding inclusive polygon and zero, one or more interior exclusive polygons. Construct aGXPLY
object using theGXPLY.add_polygon_ex
function, to add both inclusive (as the firstGXPLY
) and exclusive interior regions.
- classmethod decay_curve(mview, vv_x, vv_y, v_ay, v_ax, log, log_min, angle, x_bar, y_bar, x_off_set, y_off_set, width, height, x_min, y_min, x_scale, y_scale, line_pitch, line_style, line_color)[source]¶
Plot decay curves at survey locations
- Parameters:
mview (GXMVIEW) – View
v_ax (GXVA) –
GXVA
channel as horizontal axis (normally time channel)log (int) – Log option: 0 linear (default), 1 logarithm, 2 log/linear
log_min (float) – Min value to apply log (must be > 0.0)
angle (float) – Angle in degrees measured CCW from East of the map
x_bar (int) – Draw horizontal bar: 0 none, 1 bottom, 2 top, 3 both
y_bar (int) – Draw vertical bar: 0 none, 1 bottom, 2 top, 3 both
x_off_set (float) – X offset in mm: Horizontal distance between survey location and origin of the box inside which decay curvey is drawn
y_off_set (float) – Y offset in mm
width (float) – Box width in mm:Decay curve at each survey location is drawn within this box
height (float) – Box height in mm
x_min (float) – Minimum value for X (horizontal axis)
y_min (float) – Minimum value for Y (vertical axis)
x_scale (float) – X scale
y_scale (float) – Y scale
line_pitch (float) – Line pitch, default is 5.0mm
line_style (int) – Line style
line_color (str) – Line color
New in version 5.0.
License: Geosoft Open License
Note: Box width and height are used to draw horizontal and vertical bars. Curves outside the box are not clipped.
- classmethod direction_plot(mview, vv_x, vv_y, size, loc, align)[source]¶
Plot an arrow to indicate the direction of a flight line
- Parameters:
New in version 5.0.
License: Geosoft Open License
Note: An arrow will be drawn in the direction from the first valid to the last points in the X and Y VVs.
- classmethod em_forward(mview, xo, yo, size_x, size_y, coil_sep, coil_frequency, coil_configuration, r, h, i, q, rvv, hvv, ivv, qvv, lin_log, var)[source]¶
Plot an EM forward model against inverted data.
- Parameters:
mview (GXMVIEW) – View
xo (float) – Plot X origin
yo (float) – Plot Y origin
size_x (float) – Plot X size
size_y (float) – Plot Y size
coil_sep (float) – Coil Separation (m)
coil_frequency (float) – Coil Frequency (Hz)
coil_configuration (int) – EMLAY_GEOMETRY constants
r (float) – Inverted or current resistivity
h (float) – Inverted or current height
i (float) – In-phase datum
q (float) – Quadrature datum
rvv (GXVV) – Forward model resistivities
hvv (GXVV) – Forward model heights
ivv (GXVV) – Forward model In-phase (ppm)
qvv (GXVV) – Forward model Quadrature (ppm)
lin_log (int) – Plot resistivity as linear (0) or log (1)
var (int) – Plot as function of resistivity (0) or height (1)
New in version 5.0.
License: Geosoft End-User License
Note: This function is designed to display an inverted result beside the forward model curves. This is useful for trouble-shooting or understanding why a certain inversion result was obtained. The earth model is a simple halfspace.
The forward model is plotted either as a function of resistivity at a single height, or as a function of height at a single resistivity. In either case, the relevant VVs must be completely filled (even if one is all the same value).
- classmethod export_datamine_string(mview, lst, file)[source]¶
Export selected map groups in a map view to a Datamine coordinate string file.
- Parameters:
New in version 6.3.
License: Geosoft End-User License
Note: The lines, rectangles and polygons in the specified groups will be exported to a Datamine coordinate string (
*.dm
) file. The function attempts to duplicate the colors, etc. used. Complex polygon objects will be exported as independent single polygons.See also
GXLST
class
- classmethod export_dxf_3d(mview, lst, wa)[source]¶
Export selected map groups in a map view to an AutoCAD 3D DXF file.
- Parameters:
New in version 6.2.
License: Geosoft Open License
Note: Supported objects exported include lines, polygons, text.
See also
GXLST
class
- classmethod export_map_groups_to_gdb(mview, lst, db)[source]¶
Export map group(s) to database line(s).
- Parameters:
New in version 9.4.
License: Geosoft End-User License
- classmethod export_surpac_str(mview, lst, str_wa, styles_wa)[source]¶
Export selected map groups in a map view to a Surpac
GXSTR
file.- Parameters:
New in version 6.2.
License: Geosoft End-User License
Note: The lines, rectangles and polygons in the specified groups will be exported to a Surpac
GXSTR
file. An accompanying styles file will be created which will attempt to duplicate the colors, etc. used. Complex polygon objects will be exported as independent single polygons.See also
GXLST
class
- classmethod exportable_dxf_3d_groups_lst(mview, lst)[source]¶
Return a
GXLST
of groups you can export using sExportDXF3D_MVU.- Parameters:
- Returns:
The number of groups in the
GXLST
.- Return type:
int
New in version 7.1.
License: Geosoft Open License
Note: Returns a list of visible groups that the DXF 3D export can export. Removes things like
GXVOXD
,GXAGG
, and target groups starting with “Dh”, which are typically plotted in 3D views on a reference plan oriented toward the user, and thus not exportable.
- classmethod flight_plot(mview, vv_x, vv_y, line, locate, vangle, up, loff, voff)[source]¶
Draw a flight line
- Parameters:
mview (GXMVIEW) – View
vv_x (GXVV) – X
vv_y (GXVV) – Y
line (str) – Line label
locate (int) – MVU_FLIGHT_LOCATE constants
vangle (float) – Lines steeper than this angle are considered vertical and the up label direction is used.
up (int) – Up label direction: 1 up is right, -1 up is left
loff (float) – Along line label offset in mm.
voff (float) – Perpendicular label offset mm.
New in version 5.0.
License: Geosoft Open License
Note: Current line color, thickness and style are used to draw the line.
Current font, font color and font style are used to annotate the line labels.
If current clipping is ON in the VIEW, lines will be clipped to the window before plotting. In this case, labels should be located ABOVE or BELOW the line traces to prevent labels being clipped.
The offsets dOffA and dOffB control the vertical and horizontal label offsets with respect to the ends of the line trace and depending on the label location.
The vertical line reference angle dVerAng is used to determine if lines are considered vertical or horizontal. Vertical lines use the sUp parameter to determine the label up direction. Normally, use an angle of 60 degrees unless there are lines that run in this direction.
See also
- classmethod gen_areas(mview, lines, col_vv, pat_vv, pitch)[source]¶
Generate areas from an line group.
- Parameters:
New in version 5.0.
License: Geosoft Open License
Note: The specified line group will be used to create a new group that is composed of all the resolved polygonal areas in the line group. Each polygonal area is assigned a color/pattern as specified in the color and pattern
GXVV
’s. Color/patterns are assigned in rotating sequence.See also
- classmethod generate_surface_from_voxel(mview, vox, method, option, min_value, max_value, col, line_thick, transparency, surface_name)[source]¶
TODO…
- Parameters:
mview (GXMVIEW) – View
vox (GXVOX) – Voxel model
method (int) – MVU_VOX_SURFACE_METHOD constants
option (int) – MVU_VOX_SURFACE_OPTION constants
min_value (float) – Iso-surface value
max_value (float) – For closed surfaces: close between the selected value and this value (set equal to the Iso-surface to close within nearest values below, DUMMY to close within nearest value above)
col (int) – Drawing color
line_thick (float) – Line thickness for line drawing, and 2D views.
transparency (float) – Transparency (0 - transparent, 1 - opaque).
surface_name (str) – Geosurface file
New in version 8.5.
License: Geosoft Open License
Note: TODO… Move to
GXVOX
method for surface generation only and use GeosurfaceD to display.
- classmethod get_range_gocad_surface(file, min_x, min_y, min_z, max_x, max_y, max_z)[source]¶
Get the XYZ range of a GOCAD surface.
- Parameters:
New in version 6.4.
License: Geosoft Open License
Note: Required to set up a map view before doing the actual surface import.
- classmethod histogram(mview, st_data, st_hist, title, unit, xm, ym, widthm, heightm, xd, yd, widthd, heightd, sum_width, log, summ, fill_color, st_box)[source]¶
Plot the histogram on a map.
- Parameters:
mview (GXMVIEW) – View
st_hist (GXST) –
GXST
with histogram info of original or log10 datatitle (str) – Title
unit (str) – Unit
xm (float) – X in mm (bottom left corner of histogram box)
ym (float) – Y in mm (bottom left corner of histogram box)
widthm (float) – Box width in mm
heightm (float) – Box height in mm
xd (float) – Minimum X in data unit (bottom left corner of histogram boxes)
yd (float) – Minimum Y in data unit
widthd (float) – Box width in data unit
heightd (float) – Box height in data unit
sum_width (float) – Width (mm) of the additional box for summary stats
log (int) – Log horizontal axis: 0 - Normal, 1 - Log
summ (int) – Summary stats: 0 - do not draw, 1 - draw
fill_color (int) – Fill color
st_box (GXST) –
GXST
with histogram for box-whisker plot (-1 for no plot)
New in version 5.0.
License: Geosoft Open License
Note: This function just calls
histogram2
with decimals set to -7 (7 significant figures).See also
- classmethod histogram2(mview, st_data, st_hist, x_title, y_title, xy_txt_size, title, plot_txt_size, unit, xm, ym, widthm, heightm, xd, yd, widthd, heightd, sum_width, log, summ, fill_color, st_box, x_marker)[source]¶
Plot the histogram on a map.
- Parameters:
mview (GXMVIEW) – View
st_hist (GXST) –
GXST
with histogram info of original or log10 datax_title (str) – X axis title
y_title (str) – Y axis title
xy_txt_size (float) – Text size in mm for X/Y axis’ titles. Accept dummy
title (str) – Overall title. Plotted below X axis if X axis title is not given
plot_txt_size (float) – Text size in mm for plot overall title. Accept dummy
unit (str) – Unit
xm (float) – X in mm (bottom left corner of histogram box)
ym (float) – Y in mm (bottom left corner of histogram box)
widthm (float) – Box width in mm
heightm (float) – Box height in mm
xd (float) – Minimum X in data unit (bottom left corner of histogram boxes)
yd (float) – Minimum Y in data unit
widthd (float) – Box width in data unit
heightd (float) – Box height in data unit
sum_width (float) – Width (mm) of the additional box for summary stats
log (int) – Log horizontal axis: 0 - Normal, 1 - Log
summ (int) – Summary stats: 0 - do not draw, 1 - draw
fill_color (int) – Fill color
st_box (GXST) –
GXST
with histogram for box-wisker plot (-1 for no plot)x_marker (float) – X value (threshold value) to draw a vertical line (see notes)
New in version 5.0.
License: Geosoft Open License
Note: A vertical line through from bottom to top horizontal axis is drawn Also a label ‘Threshold value’ is plotted against this line. However, None of them will be plotted if threshold value is dummy or outside the X data range.
- classmethod histogram3(mview, st_data, st_hist, title, unit, xm, ym, widthm, heightm, xd, yd, widthd, heightd, sum_width, log, summ, fill_color, data_decimal, stat_decimal, st_box)[source]¶
Plot the histogram on a map, specify decimals.
- Parameters:
mview (GXMVIEW) – View
st_hist (GXST) –
GXST
with histogram info of original or log10 datatitle (str) – Title
unit (str) – Unit
xm (float) – X in mm (bottom left corner of histogram box)
ym (float) – Y in mm (bottom left corner of histogram box)
widthm (float) – Box width in mm
heightm (float) – Box height in mm
xd (float) – Minimum X in data unit (bottom left corner of histogram boxes)
yd (float) – Minimum Y in data unit
widthd (float) – Box width in data unit
heightd (float) – Box height in data unit
sum_width (float) – Width (mm) of the additional box for summary stats
log (int) – Log horizontal axis: 0 - Normal, 1 - Log
summ (int) – Summary stats: 0 - do not draw, 1 - draw
fill_color (int) – Fill color
data_decimal (int) – Decimals for data, negative for sig. fig.
stat_decimal (int) – Decimals for stats, negative for sig. fig.
st_box (GXST) –
GXST
with histogram for box-whisker plot (-1 for no plot)
New in version 5.0.
License: Geosoft Open License
- classmethod histogram4(mview, st_data, st_hist, title, unit, xm, ym, widthm, heightm, xd, yd, widthd, heightd, sum_width, log, summ, prob, fill_color, data_decimal, stat_decimal, st_box)[source]¶
As
histogram3
, but allow probability scaling of percents.- Parameters:
mview (GXMVIEW) – View
st_hist (GXST) –
GXST
with histogram info of original or log10 datatitle (str) – Title
unit (str) – Unit
xm (float) – X in mm (bottom left corner of histogram box)
ym (float) – Y in mm (bottom left corner of histogram box)
widthm (float) – Box width in mm
heightm (float) – Box height in mm
xd (float) – Minimum X in data unit (bottom left corner of histogram boxes)
yd (float) – Minimum Y in data unit
widthd (float) – Box width in data unit
heightd (float) – Box height in data unit
sum_width (float) – Width (mm) of the additional box for summary stats
log (int) – Log horizontal axis: 0 - Normal, 1 - Log
summ (int) – Summary stats: 0 - do not draw, 1 - draw
prob (int) – Probability scaling: 0 - linear scale, 1 - scale as normal distribution
fill_color (int) – Fill color
data_decimal (int) – Decimals for data, negative for sig. fig.
stat_decimal (int) – Decimals for stats, negative for sig. fig.
st_box (GXST) –
GXST
with histogram for box-whisker plot (-1 for no plot)
New in version 5.0.
License: Geosoft Open License
- classmethod histogram5(mview, st_data, st_hist, title, unit, lmd, xm, ym, widthm, heightm, xd, yd, widthd, heightd, sum_width, log, summ, prob, fill_color, data_decimal, stat_decimal, st_box, itr)[source]¶
As
histogram4
, but allowGXITR
to color bars.- Parameters:
mview (GXMVIEW) – View
st_hist (GXST) –
GXST
with histogram info of original or log10 datatitle (str) – Title
unit (str) – Unit
lmd (float) – [i] Lambda Value
xm (float) – X in mm (bottom left corner of histogram box)
ym (float) – Y in mm (bottom left corner of histogram box)
widthm (float) – Box width in mm
heightm (float) – Box height in mm
xd (float) – Minimum X in data unit (bottom left corner of histogram boxes)
yd (float) – Minimum Y in data unit
widthd (float) – Box width in data unit
heightd (float) – Box height in data unit
sum_width (float) – Width (mm) of the additional box for summary stats
log (int) – Log horizontal axis: 0 - Normal, 1 - Log, 2 - Lambda
summ (int) – Summary stats: 0 - do not draw, 1 - draw
prob (int) – Probability scaling: 0 - linear scale, 1 - scale as normal distribution
fill_color (int) – Fill color
data_decimal (int) – Decimals for data, negative for sig. fig.
stat_decimal (int) – Decimals for stats, negative for sig. fig.
st_box (GXST) –
GXST
with histogram for box-whisker plot (-1 for no plot)
New in version 5.0.
License: Geosoft Open License
Note: The
GXITR
can be empty (but must still be a validGXITR
object).
- classmethod import_gocad_surface(mview, file, col)[source]¶
Import and plot a GOCAD surface model.
- Parameters:
mview (GXMVIEW) – View
file (str) – GOCAD file name
col (int) – Color to plot (
C_TRANSPARENT
to use file-defined color).
New in version 6.4.
License: Geosoft Open License
Note: The vertex normals are not included in the GOCAD import, but are calculated using the normal of each defined triangle, and taking the average when vertex is shared among more than one triangle.
- is_null()[source]¶
Check if this is a null (undefined) instance
- Returns:
True if this is a null (undefined) instance, False otherwise.
- Return type:
bool
- classmethod load_plot(map, name)[source]¶
Load a Geosoft PLT file into a
GXMAP
.- Parameters:
map (GXMAP) – Map handle
name (str) – Plot file name
New in version 5.0.
License: Geosoft Open License
- classmethod map_from_plt(map, base, data, plt, mpx, mpy)[source]¶
Creates a new map from a PLT file.
- Parameters:
New in version 5.0.
License: Geosoft Open License
Note: This only creates a map, it does not read the PLT into the map. The base view and data view will be the same size.
See also
- classmethod map_mdf(map, mdf, data)[source]¶
Creates an MDF from a Map.
New in version 5.0.
License: Geosoft Open License
- classmethod mapset(map, base, data, min_x, max_x, min_y, max_y, size, port, exact, scale, conv, marg_xmin, marg_xmax, marg_ymin, marg_ymax, inside)[source]¶
Creates a new map directly from parameters.
- Parameters:
base (str) – Name to use for the base map view
data (str) – Name to use for the data view
min_x (float) – Minimum X of data area (data units)
max_x (float) – Maximum X of data area (data units)
min_y (float) – Minimum Y of data area (data units)
max_y (float) – Maximum Y of data area (data units)
size (str) – Media size as a string ‘x_cm,y_cm’, or a standard paper size (e.g. ‘A4’, ‘E’)
port (int) – 0 - landscape; 1 - portrait
exact (int) – 1 - map size fixed to media; 0 - map size adjusted to data and margins.
scale (float) – Map scale (rDummy for default)
conv (float) – Conversion factor (to units/meter) (rDummy for default)
marg_xmin (float) – Left margin (cm)
marg_xmax (float) – Right margin (cm)
marg_ymin (float) – Bottom margin (cm)
marg_ymax (float) – Top margin (cm)
inside (float) – Inside data margin (cm)
New in version 5.0.
License: Geosoft Open License
- classmethod mapset2(map, base, data, min_x, max_x, min_y, max_y, size, port, exact, scale, vert_exag, conv, marg_xmin, marg_xmax, marg_ymin, marg_ymax, inside)[source]¶
Same as
mapset
, with vertical exaggeration.- Parameters:
base (str) – Name to use for the base map view
data (str) – Name to use for the data view
min_x (float) – Minimum X of data area (data units)
max_x (float) – Maximum X of data area (data units)
min_y (float) – Minimum Y of data area (data units)
max_y (float) – Maximum Y of data area (data units)
size (str) – Media size as a string ‘x_cm,y_cm’, or a standard paper size (e.g. ‘A4’, ‘E’)
port (int) – 0 - landscape; 1 - portrait
exact (int) – 1 - map size fixed to media; 0 - map size adjusted to data and margins.
scale (float) – Map scale (rDummy for default)
vert_exag (float) – Vertical Exaggeration (1.0 for none)
conv (float) – Conversion factor (to units/meter) (rDummy for default)
marg_xmin (float) – Left margin (cm)
marg_xmax (float) – Right margin (cm)
marg_ymin (float) – Bottom margin (cm)
marg_ymax (float) – Top margin (cm)
inside (float) – Inside data margin (cm)
New in version 8.3.
License: Geosoft Open License
- classmethod mapset2_test(min_x, max_x, min_y, max_y, size, port, exact, scale, vert_exag, conv, marg_xmin, marg_xmax, marg_ymin, marg_ymax, inside)[source]¶
Test function to ensure parameters to
mapset
is sane- Parameters:
min_x (float) – Minimum X of data area (data units)
max_x (float) – Maximum X of data area (data units)
min_y (float) – Minimum Y of data area (data units)
max_y (float) – Maximum Y of data area (data units)
size (str) – Media size as a string ‘x_cm,y_cm’, or a standard paper size (e.g. ‘A4’, ‘E’)
port (int) – 0 - landscape; 1 - portrait
exact (int) – 1 - map size fixed to media; 0 - map size adjusted to data and margins.
scale (float_ref) – Map scale (rDummy for default)
vert_exag (float) – Vertical exaggeration (Normally 1.0)
conv (float) – Conversion factor (to units/meter) (rDummy for default)
marg_xmin (float) – Left margin (cm)
marg_xmax (float) – Right margin (cm)
marg_ymin (float) – Bottom margin (cm)
marg_ymax (float) – Top margin (cm)
inside (float) – Inside data margin (cm)
- Returns:
True
if the parameters are good.- Return type:
bool
New in version 8.3.
License: Geosoft Open License
Note: Same as
mapset_test
, with vertical exaggeration.
- classmethod mapset_test(min_x, max_x, min_y, max_y, size, port, exact, scale, conv, marg_xmin, marg_xmax, marg_ymin, marg_ymax, inside)[source]¶
Test function to ensure parameters to
mapset
is sane- Parameters:
min_x (float) – Minimum X of data area (data units)
max_x (float) – Maximum X of data area (data units)
min_y (float) – Minimum Y of data area (data units)
max_y (float) – Maximum Y of data area (data units)
size (str) – Media size as a string ‘x_cm,y_cm’, or a standard paper size (e.g. ‘A4’, ‘E’)
port (int) – 0 - landscape; 1 - portrait
exact (int) – 1 - map size fixed to media; 0 - map size adjusted to data and margins.
scale (float_ref) – Map scale (rDummy for default)
conv (float) – Conversion factor (to units/meter) (rDummy for default)
marg_xmin (float) – Left margin (cm)
marg_xmax (float) – Right margin (cm)
marg_ymin (float) – Bottom margin (cm)
marg_ymax (float) – Top margin (cm)
inside (float) – Inside data margin (cm)
- Returns:
True
if the parameters are good.- Return type:
bool
New in version 6.3.
License: Geosoft Open License
Note: Use
GXSYS.show_error
to display errors that may have been encountered. This function can also be used to calculate the default scale without creating a map.
- classmethod mdf(map, mdf, base, data)[source]¶
Creates a new map from an MDF file.
- Parameters:
New in version 5.0.
License: Geosoft Open License
- classmethod path_plot(mview, vv_x, vv_y, line, locate, vangle, up, loff, voff, gap)[source]¶
Draw a flight line
- Parameters:
mview (GXMVIEW) – View
vv_x (GXVV) – X
vv_y (GXVV) – Y
line (str) – Line label
locate (int) – MVU_FLIGHT_LOCATE constants
vangle (float) – Lines steeper than this angle are considered vertical and the up label direction is used.
up (int) – Up label direction: 1 up is right -1 up is left
loff (float) – Along line label offset in mm.
voff (float) – Perpendicular label offset mm.
gap (float) – Maximum gap before breaking line, 0.0 for no breaks.
New in version 5.0.
License: Geosoft Open License
Note: See
flight_plot
. This is the same except for the additional line gap parameter.See also
- classmethod path_plot_ex(mview, vv_x, vv_y, line, locate, compass, vangle, up, loff, voff, gap)[source]¶
Draw a flight line
- Parameters:
mview (GXMVIEW) – View
vv_x (GXVV) – X
vv_y (GXVV) – Y
line (str) – Line label
locate (int) – MVU_FLIGHT_LOCATE constants
compass (int) – MVU_FLIGHT_COMPASS constants
vangle (float) – Lines steeper than this angle are considered vertical and the up label direction is used.
up (int) – Up label direction: 1 up is right -1 up is left
loff (float) – Along line label offset in mm.
voff (float) – Perpendicular label offset mm.
gap (float) – Maximum gap before breaking line, 0.0 for no breaks.
New in version 5.0.
License: Geosoft Open License
Note: This is the same except for the additional line compass parameter.
See also
- classmethod path_plot_ex2(mview, vv_x, vv_y, line, locate, compass, vangle, up, loff, voff, gap, dummies)[source]¶
Draw a flight line
- Parameters:
mview (GXMVIEW) – View
vv_x (GXVV) – X
vv_y (GXVV) – Y
line (str) – Line label
locate (int) – MVU_FLIGHT_LOCATE constants
compass (int) – MVU_FLIGHT_COMPASS constants
vangle (float) – Lines steeper than this angle are considered vertical and the up label direction is used.
up (int) – Up label direction: 1 up is right -1 up is left
loff (float) – Along line label offset in mm.
voff (float) – Perpendicular label offset mm.
gap (float) – Maximum gap before breaking line, 0.0 for no breaks.
dummies (int) – MVU_FLIGHT_DUMMIES constants
New in version 5.0.8.
License: Geosoft Open License
Note: This is the same except for the additional line dummies parameter.
See also
- classmethod plot_voxel_slice(mview, vox, itr, x, y, dOrigin, dMin, dmax, res)[source]¶
Extract a vertical slice from a voxel along a path and plot it to a 2D view.
- Parameters:
mview (GXMVIEW) – View
vox (GXVOX) – Voxel model
itr (GXITR) – colour model
x (GXVV) – x-values along the line
y (GXVV) – y-values along the line
dOrigin (float) – Distance at the first XY location (normally 0.0)
dMin (float) – Starting distance to plot
dmax (float) – Ending distance to plot
res (float) – Sampling resolution
New in version 2022.2.
License: Geosoft Open License
Note: The path is splined linearly between points and sampled at the input interval. The resulting vertical samples of cubes are plotted as “pixel strips” in the view.
- classmethod plot_voxel_surface(mview, vox, value, col, line_thick)[source]¶
Extract an iso-surface from a voxel and plot it to a 2D or 3D view.
- Parameters:
New in version 6.4.
License: Geosoft Open License
Note: The Marching Cubes method of Lorensen and Cline, Computer Graphics, V21, Number 4, July 1987, is used to calculate a given iso-surface in a voxel model. The resulting surface is plotted to a 2D or 3D view. If the view is 2-D, then only the intersection of the surface with the 2D surface is plotted, using lines.
- classmethod plot_voxel_surface2(mview, vox, value, col, line_thick, transparency, surface_name)[source]¶
Extract an iso-surface from a voxel and plot it to a 2D or 3D view.
- Parameters:
New in version 7.3.
License: Geosoft Open License
Note: The Marching Cubes method of Lorensen and Cline, Computer Graphics, V21, Number 4, July 1987, is used to calculate a given iso-surface in a voxel model. The resulting surface is plotted to a 2D or 3D view. If the view is 2-D, then only the intersection of the surface with the 2D surface is plotted, using lines.
- classmethod post(mview, vv_x, vv_y, vv_z, dummy, size, format, decimals, ref, angle)[source]¶
Post values on a map.
- Parameters:
New in version 5.0.
License: Geosoft Open License
- classmethod post_ex(mview, vv_x, vv_y, vv_z, vv_s, dummy, base, min_detect, size, format, decimals, offset_l, offset_p, alternate, mod, ref, angle, fixed, ref_ang, up)[source]¶
Post values on a map with more paramters.
- Parameters:
mview (GXMVIEW) – View
vv_x (GXVV) – X locations
vv_y (GXVV) – Y locations
vv_z (GXVV) – Values to post
vv_s (GXVV) – Station
dummy (bool) – Do not plot dummy values?
base (float) – Base to remove, default is 0.0
min_detect (float) – Detection limit, can be
GS_R8DM
size (int) – Numb Size
format (int) – Format
decimals (int) – Decimals
offset_l (float) – Offset along line (right and above are positive)
offset_p (float) – Offset perpendicular to line
alternate (int) – TRUE - Positive above, Negative below FALSE - All above.
mod (float) – Modulas on station vv
ref (int) – Reference point number
angle (float) – Text angle (degree, CCW from down-line)
fixed (int) – Fixed angle ?
ref_ang (float) – Vertical reference angle
up (int) – 1 up is right, -1 up is left
New in version 5.0.
License: Geosoft Open License
- classmethod probability(mview, st_data, st_hist, title, unit, transform, lmd, xm, ym, widthm, heightm, symb_size, sigma, sum_width, summ, data_decimal, stat_decimal, itr)[source]¶
Plot a probability plot on a map.
- Parameters:
mview (GXMVIEW) – View
st_hist (GXST) –
GXST
with histogram info of original or log10 datatitle (str) – Title
unit (str) – Unit
transform (int) – Transform type (0: Raw, 1: Log, 2: Lambda)
lmd (float) – Lambda Value for lambda transform
xm (float) – X in mm (bottom left corner of histogram box)
ym (float) – Y in mm (bottom left corner of histogram box)
widthm (float) – Box width in mm
heightm (float) – Box height in mm
symb_size (float) – Symbol size in mm
sigma (float) – Sigma (X range is -sigma to sigma)
sum_width (float) – Width (mm) of the additional box for summary stats
summ (int) – Summary stats: 0 - do not draw, 1 - draw
data_decimal (int) – Decimals for data, negative for sig. fig.
stat_decimal (int) – Decimals for stats, negative for sig. fig.
New in version 5.1.8.
License: Geosoft Open License
Note: The
GXITR
can be empty (but must still be a validGXITR
object).
- classmethod profile_plot(mview, vv_x, vv_y, vv_z, vangle, up, gap, base, scale, join)[source]¶
Draw a profile along line trace
- Parameters:
mview (GXMVIEW) – View
vv_x (GXVV) – X
vv_y (GXVV) – Y
vv_z (GXVV) – Z
vangle (float) – Lines steeper than this angle are considered vertical and the up label direction is used.
up (int) – Up label direction: 1 up is right -1 up is left
gap (float) – Maximum gap in data to span (view units)
base (float) – Z profile base,
rDUMMY
to use data minimumscale (float) – Z scale in view units/Z unit
join (int) – 1 to join profile to line ends.
New in version 5.0.
License: Geosoft Open License
Note: Profiles will be drawn in the current line style.
- classmethod profile_plot_ex(mview, vv_x, vv_y, vv_z, vangle, up, gap, base, scale, join, log, log_base, smooth, pos_f_color, neg_f_color)[source]¶
Draw a profile along line trace with more parameters
- Parameters:
mview (GXMVIEW) – View
vv_x (GXVV) – X
vv_y (GXVV) – Y
vv_z (GXVV) – Z
vangle (float) – Lines steeper than this angle are considered vertical and the up label direction is used.
up (int) – Up label direction: 1 up is right -1 up is left
gap (float) – Maximum gap in data to span (view units)
base (float) – Z profile base,
rDUMMY
to use data minimumscale (float) – Z scale in view units/Z unit
join (int) – 1 to join profile to line ends.
log (int) – Log option: 0 linear (default), 1 logarithm, 2 log/linear
log_base (float) – Log base
smooth (int) – Smooth curve option: 0 no (default), 1 yes
pos_f_color (str) – Positive fill color
neg_f_color (str) – Negative fill color
New in version 5.0.
License: Geosoft Open License
Note: Profiles will be drawn in the current line style.
- classmethod prop_symb_legend(mview, x1, y1, font_size, symb_scale, base, n_symb, start, increment, title, sub_title)[source]¶
Draw a legend for proportional symbols.
- Parameters:
x1 (float) – Plot origin X
y1 (float) – Plot origin Y
font_size (float) – Label Font size (mm)
symb_scale (float) – Symbol scale factor (data value/mm)
base (float) – Base value to remove before scaling
n_symb (int) – Number of symbols
start (float) – Starting symbol data value (>= Base value)
increment (float) – Data value increment (>0.0)
title (str) – Plot title
sub_title (str) – Plot subtitle
New in version 5.0.8.
License: Geosoft Open License
Note: All symbol attributes, except for the size, are assumed to be defined (or defaults are used). Spacing is based on the maximum of the largest plotted symbol and the font size.
- classmethod re_gen_areas(mview, lines)[source]¶
Re-Generate from a line group and existing area group
- Parameters:
mview (GXMVIEW) – View
lines (str) – Group with lines
New in version 5.0.
License: Geosoft Open License
Note: The area group must exist and will be modified to match the current line group.
All non-polygon entities in the current area group will remain in the new area group. All existing polygon groups will be used to determine the most likely attributes for the new polygon groups.
There must be existing polygon groups in the area group.
See also
- classmethod symb_off(mview, vv_x, vv_y, vv_f, x_off, y_off)[source]¶
Draws symbols with an offset and against a flag channel
- Parameters:
New in version 5.0.
License: Geosoft Open License
Note: Symbols are not plotted for positions where the flag
GXVV
value is 0 oriDUMMY
.
- classmethod text_box(mview, xmin, ymin, xmax, ymax, text, space, type)[source]¶
Draw a wrapped text box
- Parameters:
mview (GXMVIEW) – View
xmin (float) – Min X
ymin (float) – Min Y
xmax (float) – Max X
ymax (float) – Max Y
text (str) – Text
space (float) – Line spacing (1.2 good)
type (int) – MVU_TEXTBOX constants
New in version 5.0.
License: Geosoft Open License
- classmethod tick(mview, vv_x, vv_y, vv_s, size, mod, mt_size, mt_mod)[source]¶
Draw line ticks on a map.
- Parameters:
New in version 5.0.
License: Geosoft Open License
- classmethod tick_ex(mview, vv_x, vv_y, vv_s, size, mod, mt_size, mt_mod, gap)[source]¶
Same as
tick
, with gap allowance.- Parameters:
mview (GXMVIEW) – View
vv_x (GXVV) – X locations
vv_y (GXVV) – Y locations
vv_s (GXVV) – Station
size (float) – Tick size
mod (float) – Tick modulus on station vv
mt_size (float) – Major tick size
mt_mod (float) – Major tick modulus on station vv
gap (float) – Maximum gap to span; set to 0 or
rDUMMY
to ignore all gaps.
New in version 6.3.
License: Geosoft Open License
- classmethod trnd_path(mview, vv_x, vv_y, min_sect, min_dist)[source]¶
Plot min and max trend lines.
- Parameters:
New in version 5.0.
License: Geosoft Open License
Note: Trend lines positions consist of X and Y VVs interspersed with dummies, which separate the individual trend sections. Set the minimum number of sections to > 0 to plot only the longer trend lines. (The number of sections in one trend section is equal to the number of points between dummies minus one.) Set the minimum distance to > 0 to plot only the longer trend lines.
EMLAY_GEOMETRY constants¶
Type of Geometry
ARROW_ALIGNMENT constants¶
Direction of alignment
BARCHART_LABEL constants¶
Place to draw bar labels
COLORBAR_LABEL constants¶
Label text orientation
COLORBAR_STYLE constants¶
Label text orientation
MVU_ORIENTATION constants¶
Orientation (of whatever)
MVU_DIVISION_STYLE constants¶
Orientation (of whatever)
MVU_ARROW constants¶
Type Arrow. These definitions are used as binary flags, and can be used together by passing sums.
- MVU_ARROW_SOLID¶
Plot the head as a solid triangle, otherwise plot a “stick arrow” with three lines for the tail and two barbs.
- gxapi.MVU_ARROW_SOLID = 1¶
- MVU_ARROW_FIXED¶
If used, input the actual length of the barbs on the arrow, in view X-axis units, as measured along the tail. If not used, enter the ratio between the length of the barbs and full length of the arrow (e.g. 0.4). In the latter case, the longer the arrow, the bigger the arrow head.
- gxapi.MVU_ARROW_FIXED = 2¶
MVU_FLIGHT_COMPASS constants¶
Compass direction
MVU_FLIGHT_DUMMIES constants¶
Show Dummies
MVU_FLIGHT_LOCATE constants¶
Line label locations
- MVU_FLIGHT_LOCATE_END¶
L100.2 -------------------------- L100.2
dOffA controls distance from label to line. dOffB controls vertical offset from center.
- gxapi.MVU_FLIGHT_LOCATE_END = 1¶
- MVU_FLIGHT_LOCATE_ABOVE¶
L100.2 L100.2 ----------------------------------------
dOffA controls label distance above the line. dOffB controls offset in from line end.
- gxapi.MVU_FLIGHT_LOCATE_ABOVE = 2¶
MVU_VOX_SURFACE_METHOD constants¶
TODO
MVU_VOX_SURFACE_OPTION constants¶
TODO
MVU_TEXTBOX constants¶
Type of Box
MVU_VPOINT constants¶
Head Acuteness
MVU_VPOS constants¶
Head Position
MVU_VSIZE constants¶
Head Size
MVU_VSTYLE constants¶
Head Style