pygmi.bholes.graphs#

Methods to plot borehole data via the context menu.

Classes#

PlotLog

Class to plot the borehole log.

Functions#

gethatch(svgfile)

Get hatching from an SVG file, to be used on the log.

commentprep(mystring[, slen])

Create the correct case for a string and inserts carriage returns.

chkname(iname)

Check a filename for illegal characters.

Module Contents#

class pygmi.bholes.graphs.PlotLog(parent=None)#

Bases: pygmi.misc.ContextModule

Class to plot the borehole log.

Parameters:

parent – Reference to the parent routine. The default is None.

change_band()#

Combo box to choose the borehole to display.

load_hatch()#

Load all hatchings.

run()#

Entry point into the routine, used to run context menu item.

update_legend(df, hatch, clith, col, stratcol)#

Update the plot legend.

Parameters:
  • df (pandas.DataFrame) – Dataframe containing the data.

  • hatch (dict) – Hatchings.

  • clith (dict) – Lithology text.

  • col (dict) – Colours.

  • stratcol (dict) – Stratigraphy colour.

update_log(df, hatch, col, stratcol)#

Update the borehole log plot.

Parameters:
  • df (pandas.DataFrame) – Dataframe containing the data.

  • hatch (dict) – Hatchings.

  • col (dict) – Colours.

  • stratcol (dict) – Stratigraphy colour.

pygmi.bholes.graphs.gethatch(svgfile)#

Get hatching from an SVG file, to be used on the log.

Parameters:

svgfile (str) – SVG filename.

Returns:

  • pverts (dict) – Vertices.

  • pcodes (dict) – Codes.

Return type:

tuple[dict, dict]

pygmi.bholes.graphs.commentprep(mystring, slen=50)#

Create the correct case for a string and inserts carriage returns.

Parameters:
  • mystring (str) – String to correct.

  • slen (int) – String length. The default is 50.

Returns:

Output string.

Return type:

str

pygmi.bholes.graphs.chkname(iname)#

Check a filename for illegal characters.

Parameters:

iname (str) – Input filename.

Returns:

Corrected filename.

Return type:

str