plot ¶
Plots on matplotlib (the plot extra).
Every function draws on ax when given, else on a new figure, and returns (fig, ax); scatter_matrix and
variograms take and return a grid of axes instead, and category_colors and category_legend return what they
make.
InvalidInput ¶
histogram ¶
histogram(
values,
*,
weights=None,
bins=40,
log=False,
stats=False,
data=None,
ax=None,
**kwargs,
)
Histogram of relative frequencies, declustered by weights; log bins on a log axis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
str or array_like
|
Values; NaN is ignored. |
required |
weights
|
str or array_like
|
Declustering weights. |
None
|
bins
|
int or array_like
|
Number of bins or their edges. |
40
|
log
|
bool
|
Log-spaced bins over the positive values and a log x axis. |
False
|
stats
|
bool
|
Write the count, weighted mean, CV and P10, P50, P90 in the upper right corner. |
False
|
data
|
(PointSet, BlockModel, Table or mapping)
|
Container whose columns |
None
|
**kwargs
|
Passed to |
required |
probability ¶
probability(
values,
*,
weights=None,
log=False,
cap=None,
fences=None,
data=None,
ax=None,
**kwargs,
)
Cumulative probability on a normal scale: a Gaussian (or, with log, lognormal) distribution is a line.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
str or array_like
|
Values; NaN is ignored. |
required |
weights
|
str or array_like
|
Declustering weights. |
None
|
log
|
bool
|
Log x axis. |
False
|
cap
|
float
|
Top cut, drawn as a dashed vertical line. |
None
|
fences
|
float
|
Outlier fences |
None
|
data
|
(PointSet, BlockModel, Table or mapping)
|
As in |
None
|
**kwargs
|
Passed to |
required |
cdf ¶
cdf(
values,
*,
weights=None,
labels=None,
log=False,
stats=False,
data=None,
ax=None,
**kwargs,
)
Cumulative distribution of one or several series overlaid, e.g. domains, or clustered and declustered.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
str, array_like or list of them
|
One series, or several; NaN is ignored. |
required |
weights
|
array_like or list
|
Declustering weights: an array for one series; for several, one array or None each. |
None
|
labels
|
list of str
|
Legend entries. |
None
|
log
|
bool
|
Log x axis. |
False
|
stats
|
bool
|
Write the count, weighted mean, CV and P10, P50, P90 of each series in the upper left corner, which a cumulative distribution leaves empty. |
False
|
data
|
(PointSet, BlockModel, Table or mapping)
|
Container whose columns |
None
|
**kwargs
|
Passed to every |
required |
qq ¶
qq(
x,
y,
*,
x_weights=None,
y_weights=None,
quantiles=None,
log=False,
data=None,
ax=None,
**kwargs,
)
Quantiles of y against the same quantiles of x, with the 1:1 line on which equal distributions lie.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
str or array_like
|
Two samples, e.g. one domain and another, or composites and blocks; NaN is ignored. |
required |
y
|
str or array_like
|
Two samples, e.g. one domain and another, or composites and blocks; NaN is ignored. |
required |
x_weights
|
str or array_like
|
Declustering weights of each. |
None
|
y_weights
|
str or array_like
|
Declustering weights of each. |
None
|
quantiles
|
array_like
|
Probabilities; default 0.01 to 0.99 in steps of 0.01. |
None
|
log
|
bool
|
Log axes. |
False
|
data
|
(PointSet, BlockModel, Table or mapping)
|
As in |
None
|
**kwargs
|
Passed to |
required |
boxplot ¶
boxplot(
values,
categories,
*,
weights=None,
sort=False,
log=False,
scheme=None,
data=None,
ax=None,
**kwargs,
)
One box per category: P25 to P75, median, P10 to P90 whiskers and the mean, all weighted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
str or array_like
|
Values; NaN is ignored. |
required |
categories
|
array_like
|
Category (e.g. domain) of each value, its code when |
required |
weights
|
str or array_like
|
Declustering weights. |
None
|
sort
|
bool
|
Order boxes by median, else by category. |
False
|
log
|
bool
|
Log value axis. |
False
|
scheme
|
Categories
|
Names and colors of the categories. |
None
|
data
|
(PointSet, BlockModel, Table or mapping)
|
Container whose columns |
None
|
**kwargs
|
Passed to |
required |
variogram ¶
variogram(
experimental,
*,
variogram=None,
direction=None,
ax=None,
**kwargs,
)
Experimental variogram, points sized by pair count, with variogram and its sill.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
experimental
|
ExperimentalVariogram
|
|
required |
variogram
|
Variogram
|
|
None
|
direction
|
tuple of float
|
|
None
|
**kwargs
|
Passed to |
required |
variograms ¶
variograms(
variograms,
*,
model=None,
labels=None,
axes=None,
**kwargs,
)
Every direct and cross variogram of a VariogramSet as a matrix of panels, with model if given.
Panel (i, j) holds the direct variogram of variable i on the diagonal and the cross variogram of
i and j above it; the lower triangle is left empty. Points are sized by their share of the largest pair
count, one color per direction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variograms
|
VariogramSet
|
|
required |
model
|
Coregionalization
|
Drawn as |
None
|
labels
|
list of str
|
Variable names; default the set's column names or indices. |
None
|
axes
|
array of Axes
|
|
None
|
**kwargs
|
Passed to every |
required |
Returns:
| Name | Type | Description |
|---|---|---|
fig |
Figure
|
|
axes |
ndarray of Axes
|
|
histogram_reproduction ¶
histogram_reproduction(
check,
*,
variable=0,
scores=False,
band=(0.0, 1.0),
ax=None,
**kwargs,
)
Cumulative distributions of the realizations as a band, against the declustered data's; for categories, the spread of each category's proportion across realizations against the data's.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
check
|
RealizationCheck
|
Result of |
required |
variable
|
int or str
|
Variable to draw. |
0
|
scores
|
bool
|
In the normal scores of the data, against the standard normal distribution, instead of data units. |
False
|
band
|
tuple of float
|
Quantiles across realizations bounding the band; default their full range. |
(0.0, 1.0)
|
**kwargs
|
Passed to |
required |
variogram_reproduction ¶
variogram_reproduction(
check, *, variable=0, band=(0.0, 1.0), ax=None, **kwargs
)
Experimental variograms of the realizations as a band per direction, with the data's as points and the model as a line.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
check
|
RealizationCheck
|
Result of |
required |
variable
|
int or str
|
Variable, or category for its indicator, to draw. |
0
|
band
|
tuple of float
|
Quantiles across realizations bounding each band; default their full range. |
(0.0, 1.0)
|
**kwargs
|
Passed to every |
required |
correlation_reproduction ¶
correlation_reproduction(
check, *, band=(0.0, 1.0), ax=None, **kwargs
)
Correlation of each pair of variables across realizations as a range, against the declustered data's.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
check
|
RealizationCheck
|
Result of |
required |
band
|
tuple of float
|
Quantiles across realizations bounding each range; default their full range. |
(0.0, 1.0)
|
**kwargs
|
Passed to |
required |
variogram_volume ¶
variogram_volume(
volume,
*,
plane="major-semi",
ellipse=True,
ax=None,
**kwargs,
)
Slice of a variogram volume through two of its principal axes, with the range ellipse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volume
|
VariogramVolume
|
|
required |
plane
|
(major - semi, major - minor, semi - minor)
|
Principal axes spanning the slice, drawn along x and y. |
"major-semi"
|
ellipse
|
bool
|
Draw the range ellipse and the two axes. |
True
|
**kwargs
|
Passed to |
required |
scatter ¶
scatter(x, y, *, line=True, data=None, ax=None, **kwargs)
y against x with the 1:1 line and, if line, the least-squares regression of y on x.
The regression slope of true on estimated values below 1 flags conditional bias. x and y may name columns
of data.
ternary ¶
ternary(
data,
*,
parts=None,
labels=None,
grid=True,
ax=None,
**kwargs,
)
Compositions of three parts as points in an equilateral triangle, each vertex a pure part.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
(array_like, mapping, Table, PointSet or BlockModel)
|
|
required |
parts
|
list of 3 str
|
Columns of |
None
|
labels
|
list of 3 str
|
Vertex labels; default the part names. |
None
|
grid
|
bool
|
Draw lines at every 20 % of each part. |
True
|
**kwargs
|
Passed to |
required |
biplot ¶
biplot(data, *, parts=None, labels=None, ax=None, **kwargs)
Covariance biplot of the clr coordinates: samples as points, parts as rays from the origin.
Ray length is the standard deviation of a part's clr coordinate; the distance between two ray tips is the standard deviation of the log-ratio of the two parts, so tips close together mark parts in near-constant proportion. The axes are the first two principal components, labeled with the share of total variance they hold.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
(array_like, mapping, Table, PointSet or BlockModel)
|
|
required |
parts
|
list of str
|
Columns of |
None
|
labels
|
list of str
|
Ray labels; default the part names. |
None
|
**kwargs
|
Passed to |
required |
correlation ¶
correlation(
data,
*,
columns=None,
labels=None,
weights=None,
method="pearson",
colorbar=True,
ax=None,
**kwargs,
)
Correlation, rank correlation or covariance matrix as a heatmap, each cell written out.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
(array_like, mapping, Table, PointSet or BlockModel)
|
|
required |
columns
|
list of str
|
Columns of |
None
|
labels
|
list of str
|
Axis labels; default the column names or indices. |
None
|
weights
|
array_like or str
|
Declustering weights, or their column in |
None
|
method
|
(pearson, spearman, covariance)
|
What to show; correlations span -1 to 1, covariances ± their largest magnitude. |
"pearson"
|
colorbar
|
bool
|
Add a color bar. |
True
|
**kwargs
|
Passed to |
required |
declustering ¶
declustering(result, *, naive=None, ax=None, **kwargs)
Declustered mean against cell size, the chosen size marked, and the naive mean for reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
Declustering
|
Result of |
required |
naive
|
float
|
Mean of the values without weights, drawn as a dotted line. |
None
|
**kwargs
|
Passed to |
required |
conditional ¶
conditional(
x,
y,
*,
bins=10,
weights=None,
log=False,
data=None,
ax=None,
**kwargs,
)
Scatter of y against x with the mean and P10 to P90 of y in bins of x, drawn at each bin's median.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
str or array_like
|
Pairs of values; pairs with NaN are ignored. |
required |
y
|
str or array_like
|
Pairs of values; pairs with NaN are ignored. |
required |
bins
|
int or array_like
|
Number of bins holding about as many pairs each, or bin edges of |
10
|
weights
|
str or array_like
|
Declustering weights. |
None
|
log
|
bool
|
Log axes; non-positive values are then ignored. |
False
|
data
|
(PointSet, BlockModel, Table or mapping)
|
Container whose columns |
None
|
**kwargs
|
Passed to |
required |
completeness ¶
completeness(data, *, columns=None, ax=None, **kwargs)
Rows by number of variables present, the complete rows in the accent color, each bar labeled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
(array_like, mapping, Table, PointSet or BlockModel)
|
|
required |
columns
|
list of str
|
Columns of |
None
|
**kwargs
|
Passed to |
required |
scatter_matrix ¶
scatter_matrix(
data,
*,
columns=None,
labels=None,
weights=None,
log=False,
bins=30,
axes=None,
**kwargs,
)
Pairwise scatters of the columns of data, with their histograms on the diagonal.
Each scatter is annotated with the Pearson (r) and rank correlation of its pair, weighted by weights and
over the rows where both values are present, as boitata.correlation computes them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
(array_like, mapping, Table, PointSet or BlockModel)
|
|
required |
columns
|
list of str
|
Columns of |
None
|
labels
|
list of str
|
Axis labels; default the column names or indices. |
None
|
weights
|
array_like or str
|
Declustering weights, or their column in |
None
|
log
|
bool or sequence of bool
|
Log axes and bins, for every column or per column; non-positive values are then ignored. |
False
|
bins
|
int
|
Number of histogram bins. |
30
|
axes
|
array of Axes
|
|
None
|
**kwargs
|
Passed to every |
required |
Returns:
| Name | Type | Description |
|---|---|---|
fig |
Figure
|
|
axes |
ndarray of Axes
|
|
section ¶
section(
model,
values,
*,
axis="z",
index=None,
plane=None,
origin=None,
azimuth=90.0,
dip=90.0,
holes=None,
width=None,
resolution=None,
colorbar=True,
scheme=None,
ax=None,
**kwargs,
)
Slice of a block model across axis at cell index (default: the middle), or on any plane, at true scale,
with the drill holes near it projected on top.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
BlockModel
|
Missing blocks are left blank. Drawn as true block edges (exact for masked and sub-blocked layouts)
whenever the cut is normal to one of the model's own local axes: always along |
required |
values
|
str or array_like
|
Column name, or one value per block. |
required |
axis
|
(x, y, z)
|
Axis normal to the slice. |
"x"
|
index
|
int
|
Cell index along |
None
|
plane
|
tuple
|
|
None
|
origin
|
array_like
|
|
None
|
azimuth
|
float
|
Bearing of the section line and dip of the plane through |
90.0
|
dip
|
float
|
Bearing of the section line and dip of the plane through |
90.0
|
holes
|
Drillholes
|
Traces within |
None
|
width
|
float
|
Full width of the slab around the plane that keeps |
None
|
resolution
|
float
|
Raster step on |
None
|
colorbar
|
bool
|
Add a color bar labeled with the column name, or a legend with |
True
|
scheme
|
Categories
|
|
None
|
**kwargs
|
Passed to |
required |
fence ¶
fence(
model,
values,
positions,
*,
azimuth,
dip=90.0,
resolution=None,
colorbar=True,
scheme=None,
axes=None,
**kwargs,
)
One vertical (or dipping) section per row of positions, on the same azimuth and dip, sharing one
color scale: a fence of parallel sections stepped along a corridor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
BlockModel
|
As in |
required |
values
|
str or array_like
|
Column name, or one value per block. |
required |
positions
|
array_like
|
|
required |
azimuth
|
float
|
Orientation shared by every panel's plane, in degrees; |
required |
dip
|
float
|
Orientation shared by every panel's plane, in degrees; |
required |
resolution
|
float
|
Raster step on each plane; default half the smallest block edge. |
None
|
colorbar
|
bool
|
Add one color bar for every panel, labeled with the column name, or a legend with |
True
|
scheme
|
Categories
|
|
None
|
axes
|
array of Axes
|
One per position; default a new figure. |
None
|
**kwargs
|
Passed to every |
required |
Returns:
| Name | Type | Description |
|---|---|---|
fig |
Figure
|
|
axes |
ndarray of Axes
|
|
slab ¶
slab(
coords,
values=None,
*,
plane,
thickness,
meshes=None,
lines=None,
labels=None,
colorbar=True,
scheme=None,
ax=None,
**kwargs,
)
Points within a slab around a plane, in section coordinates, with mesh traces, clipped lines and labels.
Section coordinates are world coordinates along the strike and up the dip of the plane, so a vertical east-west section reads easting and elevation, and a horizontal plane easting and northing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coords
|
PointSet or array_like
|
|
required |
values
|
str or array_like
|
Column of |
None
|
plane
|
tuple
|
|
required |
thickness
|
float
|
Full width of the slab. |
required |
meshes
|
Mesh or list of Mesh
|
Drawn as their intersection with the plane. |
None
|
lines
|
list of array_like
|
|
None
|
labels
|
sequence of str
|
One per point; each distinct label is written once, above its highest point in the slab. |
None
|
colorbar
|
bool
|
With |
True
|
scheme
|
Categories
|
|
None
|
**kwargs
|
Passed to |
required |
swath ¶
swath(swaths, *, labels=None, y='mean', ax=None, **kwargs)
Mean, tonnage or metal per slice of one or several swath results, with the first one's counts as light bars.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
swaths
|
Table or list of Table
|
Results of |
required |
labels
|
list of str
|
Legend entries. |
None
|
y
|
(mean, tonnage, metal)
|
What to draw per slice. |
"mean"
|
**kwargs
|
Passed to every |
required |
category_colors ¶
category_colors(scheme)
Color map and norm drawing code i of scheme in its color i.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scheme
|
Categories
|
Colors of the categories; when it has none, spread over matplotlib's |
required |
Returns:
| Name | Type | Description |
|---|---|---|
cmap |
ListedColormap
|
|
norm |
BoundaryNorm
|
Boundaries at every code ± 0.5; pass both as |
category_legend ¶
category_legend(scheme, ax, **kwargs)
Legend of scheme: one patch per category, in code order, in the colors of category_colors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scheme
|
Categories
|
|
required |
ax
|
Axes or Figure
|
Where the legend goes. |
required |
**kwargs
|
Passed to |
required |
Returns:
| Type | Description |
|---|---|
Legend
|
|
category_swath ¶
category_swath(
coords,
categories,
width,
*,
azimuth=None,
axis=None,
weights=None,
colors=None,
scheme=None,
ax=None,
**kwargs,
)
Proportion of each category per slice along a direction, as stacked bars.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coords
|
(PointSet, BlockModel or array_like)
|
|
required |
categories
|
str or array_like
|
Category (e.g. lithology) of each sample; its code, NaN for none, when |
required |
width
|
Slices as in |
required | |
azimuth
|
Slices as in |
required | |
axis
|
Slices as in |
required | |
weights
|
str or array_like
|
Declustering weights or lengths. |
None
|
colors
|
sequence
|
One color per category, sorted; default the scheme's, else spread over matplotlib's |
None
|
scheme
|
Categories
|
Order, names and colors of the categories. |
None
|
**kwargs
|
Passed to every |
required |
proportions ¶
proportions(
categories,
*,
weights=None,
scheme=None,
data=None,
ax=None,
**kwargs,
)
Proportion of each category as horizontal bars, weighted, with the unweighted proportions as ticks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
categories
|
array_like
|
Category of each sample; its code, NaN for none, when |
required |
weights
|
str or array_like
|
Declustering weights or lengths; the bars are then weighted and a dark tick marks each unweighted share. |
None
|
scheme
|
Categories
|
Order, names and colors of the categories. |
None
|
data
|
(PointSet, BlockModel, Table or mapping)
|
Container whose columns |
None
|
**kwargs
|
Passed to |
required |
strip_log ¶
strip_log(
drillholes,
hole,
*,
columns=(),
categories=(),
scheme=None,
runs=None,
ax=None,
**kwargs,
)
Holes as vertical logs side by side: category bars, grade profiles as steps and ore runs shaded.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
drillholes
|
Drillholes
|
With an interval table. |
required |
hole
|
str or sequence of str
|
Hole or holes to draw, left to right. |
required |
columns
|
sequence of str
|
Grade columns, one track each, drawn as steps from zero to the largest value over the holes drawn. |
()
|
categories
|
str or sequence of str
|
Categorical columns (e.g. lithology), one bar each. |
()
|
scheme
|
Categories or dict
|
Names and colors of the categories, or a Categories per column name; values outside it are left
blank. Without one, values are sorted and spread over matplotlib's |
None
|
runs
|
Table
|
From |
None
|
**kwargs
|
Passed to every grade |
required |
holes ¶
holes(
paths,
*,
plane=None,
mark=None,
hole="HOLE_ID",
labels=True,
ax=None,
**kwargs,
)
Drill-hole traces, one line per hole, in plan or projected on a section.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paths
|
Table
|
Result of |
required |
plane
|
tuple
|
|
None
|
mark
|
array_like
|
|
None
|
hole
|
str
|
Column of |
'HOLE_ID'
|
labels
|
bool
|
Label each hole at its shallowest row. |
True
|
**kwargs
|
Passed to every |
required |
directions ¶
directions(
anisotropy,
*,
plane=None,
thickness=None,
ax=None,
**kwargs,
)
Major axis of each local anisotropy as a line through its location, on a plan or a section.
Each line is the major axis projected on the view, so an axis plunging out of it draws short.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
anisotropy
|
LocalAnisotropy
|
Locations and angles (azimuth, dip, rake). |
required |
plane
|
tuple
|
|
None
|
thickness
|
float
|
With |
None
|
**kwargs
|
Passed to |
required |
paired_bias ¶
paired_bias(bias, *, ax=None, **kwargs)
Relative bias of b over a per bin of pairing distance, with the pair counts as light bars.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bias
|
Table
|
Result of |
required |
**kwargs
|
Passed to |
required |
uncertainty_curve ¶
uncertainty_curve(
curve, *, threshold=0.15, required=None, ax=None
)
Uncertainty quantiles against data spacing, the share within threshold on the right axis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
curve
|
Table
|
Result of |
required |
threshold
|
float
|
Acceptable uncertainty, drawn as a horizontal line. |
0.15
|
required
|
float
|
Required spacing, e.g. from |
None
|
grade_tonnage ¶
grade_tonnage(table, *, relative=False, ax=None, **kwargs)
Tonnage (solid) and mean grade (dashed, right axis) above cutoff, for one curve or several in one color each.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table
|
Table or dict of str to Table
|
Result of |
required |
relative
|
bool
|
Tonnage as a fraction of each curve's tonnage at its lowest cutoff, to compare samples with blocks. |
False
|
**kwargs
|
Passed to every |
required |
cross_validation ¶
cross_validation(
cv, *, kind="scatter", coords=None, ax=None, **kwargs
)
Cross-validation as actual against estimate, as an accuracy plot, or as its errors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cv
|
CrossValidation or IndicatorCrossValidation
|
Result of |
required |
kind
|
(scatter, accuracy, errors)
|
|
"scatter"
|
coords
|
PointSet or array_like
|
Sample locations for the error map, in the order given to |
None
|
**kwargs
|
Passed to |
required |
contact ¶
contact(
table,
*,
labels=("inside", "outside"),
ax=None,
**kwargs,
)
Mean grade against signed distance to a contact, the sample counts as light bars; a jump at zero is a hard contact, a gradual change a soft one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table
|
Table
|
Result of |
required |
labels
|
tuple of str
|
Names of the inside and outside domains, written on either side. |
('inside', 'outside')
|
**kwargs
|
Passed to |
required |
domain_change ¶
domain_change(
table,
*,
value="tonnage",
relative=False,
fmt=None,
ax=None,
**kwargs,
)
Cross-table of two categorical models as a matrix, rows the first model's classes, columns the second's, each cell labeled with its value. The diagonal, what is unchanged, is outlined and left blank so the grays scale to what moves.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table
|
Table
|
Result of |
required |
value
|
str
|
Column to show: |
'tonnage'
|
relative
|
bool
|
Each row as a fraction of its total: the share of each class of the first model going to each class of
the second (not with |
False
|
fmt
|
str
|
Format of the cell labels; default |
None
|
**kwargs
|
Passed to |
required |
transition_mds ¶
transition_mds(table, *, ax=None, **kwargs)
Classical (Torgerson) MDS of an along-hole transition table: categories that transition into each other most often sit close together in 2D.
The frequency column, one class's row shares, is symmetrized into a dissimilarity, 1 - (freq + freq.T)
/ 2, then scaled from the top two eigenvectors of its double-centered squared distances.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table
|
Table
|
Result of |
required |
**kwargs
|
Passed to |
required |
uncertain ¶
uncertain(
values,
uncertainty,
*,
model=None,
axis="z",
index=None,
plane=None,
resolution=None,
extent=None,
cmap=None,
norm=None,
scheme=None,
label=None,
legend_ax=None,
ax=None,
)
Image whose color gives a value and whose fading towards white gives how uncertain it is.
The legend is a fan: the value runs across its angle, certainty along its radius, from white at the center (uncertain) to the full color on the arc (certain).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
str or array_like
|
2D image, e.g. the mean of the realizations on a section; NaN is left blank. With |
required |
uncertainty
|
str or array_like
|
Same shape as |
required |
model
|
BlockModel
|
Slice it as |
None
|
axis
|
(x, y, z)
|
With |
"x"
|
index
|
int
|
With |
None
|
plane
|
tuple
|
With |
None
|
resolution
|
float
|
Raster step on |
None
|
extent
|
tuple of float
|
Passed to |
None
|
cmap
|
str or Colormap
|
Default: matplotlib's |
None
|
norm
|
Normalize
|
Maps values to [0, 1]; default spans their range. |
None
|
scheme
|
Categories
|
|
None
|
label
|
str
|
Value name written under the legend, or its title with |
None
|
legend_ax
|
Axes
|
Where to draw the legend; default below |
None
|
describe
builtin
¶
describe(
values, *, weights=None, quantiles=Ellipsis, data=None
)
Weighted (declustered) statistics of values; NaN is skipped.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
array_like or str
|
Values, or their column in |
required |
weights
|
array_like or str
|
Declustering weights; default the volumes of a BlockModel |
None
|
quantiles
|
sequence of float
|
Probabilities of the quantile keys. |
Ellipsis
|
data
|
(PointSet, BlockModel, Table or dict)
|
Where column names are looked up. |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
|
used in