krigekit.variogram_plotting#
Variogram curves, maps, polar plots, and 3-D fence visualization.
Attributes#
Functions#
|
Plot an averaged variogram and/or a fitted model curve. |
|
2D variogram map (pcolormesh) with optional anisotropy overlays. |
|
Variogram map in polar coordinates (azimuth vs lag distance). |
|
Plot the three principal anisotropy axes as 3D arrows scaled by their |
|
3D variogram map shown as orthogonal fence sections. |
Module Contents#
- krigekit.variogram_plotting.plot_vgm(avgvgm, x_col=('distance', 'mean'), y_col=('variogram', 'mean'), models=('exponential',), parameters=(1, 100, 0), plot_data=True, plot_model=True, annotate=True, ax=None, plotkws_data=None, plotkws_model=None, xlabel='Lag', ylabel='Semivariogram')#
Plot an averaged variogram and/or a fitted model curve.
- krigekit.variogram_plotting.plot_vgm_map(rawvgm, x='d0', y='d1', dist='distance', dx=None, dy=None, cutoff=None, ax=None, angle_aniso=None, ellipse_aniso=None, r_profile=None, angle=None, cmap='viridis_r', vmin=None, vmax=None, vgm='variogram', kws_cbar=None, title='Variogram Map', show_cbar=True, show_title=True)#
2D variogram map (pcolormesh) with optional anisotropy overlays.
- krigekit.variogram_plotting.plot_vgm_map_polar(rawvgm, angle='angle_h', dist='distance', da=None, dr=None, cutoff=None, angle_aniso=None, r_profile=None, cmap='viridis', vmin=None, vmax=None, vgm='variogram', kws_cbar=None)#
Variogram map in polar coordinates (azimuth vs lag distance).
- krigekit.variogram_plotting.plot_vgm_anisotropy3d(eigenvalues, eigenvectors, ax=None)#
Plot the three principal anisotropy axes as 3D arrows scaled by their eigenvalues, annotating the azimuth and dip of the major axis.
- krigekit.variogram_plotting.plot_vgm_map3d(rawvgm, x='d0', y='d1', z='d2', dist='distance', dx=None, dy=None, dz=None, cutoff=None, ax=None, angle_aniso=None, rotate_fences=False, vgm='variogram', cmap='viridis_r', vmin=None, vmax=None, bandwidth_factor=2.0, n_fences=2, fill_nan=False, kws_cbar=None, title='3D Variogram Map', show_cbar=True, show_title=True)#
3D variogram map shown as orthogonal fence sections.
Up to three mutually orthogonal fences are drawn. By default they are aligned with the world coordinate axes (XY, XZ, YZ), which makes the anisotropy angles easy to read off the plot. Set
rotate_fences=Trueto align the fences with the fitted model axes instead.World-axis-aligned fences (
rotate_fences=False, default):Fence A (always) — horizontal XY plane.
Fence B (
n_fences >= 2) — vertical XZ (East–West) plane.Fence C (
n_fences >= 3) — vertical YZ (North–South) plane.
Model-axis-aligned fences (
rotate_fences=True):Fence A — minor1 × minor2 plane (normal = major axis).
Fence B (
n_fences >= 2) — major × minor2 plane (dip section).Fence C (
n_fences >= 3) — major × minor1 plane (plunge section).
- Parameters:
dx (float, optional) – Reference horizontal bin size. Defaults to
cutoff / 10.dyis accepted for API compatibility but is ignored; usedxonly.dy (float, optional) – Reference horizontal bin size. Defaults to
cutoff / 10.dyis accepted for API compatibility but is ignored; usedxonly.dz (float, optional) – Reference vertical bin size. Defaults to the 90th-percentile of
|d2|divided by 10, which naturally tracks the (typically finer) vertical sampling scale.angle_aniso (None, float, or tuple, optional) – Model orientation. A scalar is interpreted as azimuth (degrees); a 2-tuple as
(azimuth, dip); a 3-tuple as(azimuth, dip, plunge). Only used whenrotate_fences=True(or to label the title).Noneestimates the horizontal azimuth from the cloud withestimate_aniso_angle().rotate_fences (bool, optional) – If
False(default) fences align with the world X/Y/Z axes. IfTruefences are rotated to the model anisotropy axes defined byangle_aniso.bandwidth_factor (float, optional) – Each fence selects pairs within
bandwidth_factor× (normal-axis bin size) of the fence plane. Default 2.n_fences ({1, 2, 3}, optional) – Number of orthogonal fences to draw (A only, A+B, or A+B+C). Default 2. Three fences can be informative but crowded.
fill_nan (bool, optional) – If
True, empty bins are filled with their nearest valid neighbour before rendering, but only inside the cutoff/max-lag radius. Useful when data are sparse and bins patchy. DefaultFalse.
- krigekit.variogram_plotting.hh#