histograms

petrophys.visualization.histograms

Also available as petrophys.histograms

histograms(
datasets,
curve=None,
bins=40,
density=False,
figsize=(9, 5),
title=None,
xlabel=None,
alpha=0.5,
ax=None,
value_range=None,
histtype='bar',
)[source]

Overlay histograms of several datasets (e.g. GR before/after normalization).

datasets maps a label to a 1-D array; NaNs are dropped. Or it is several wells or interpretation results (a list, the wells petrophys.read() returns, or a mapping of label to well) and curve names the curve to compare ("GR", a standard or the well’s own name), labelled by well name; the x-axis is labelled with its unit. Wells in a list that share a name (two runs of one well) are labelled "30/6-5", "30/6-5 (2)" in list order; pass a mapping ({"Archie": run_a, "Indonesia": run_b}) to name them. Wells or results, or a list, without curve raise ValueError. value_range fixes the bin range (spikes otherwise stretch it), and histtype="step" draws outlines, which stay readable for several wells.

Parameters:
Return type:

Plot