From 4b12aed20136241a4ea43c8b977769d273b02cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Sat, 13 Mar 2021 17:08:44 +0100 Subject: [PATCH] Examples: change field size in Auto-fit example to prevent confusion with sample-size --- examples/10_normalizer/01_auto_fit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/10_normalizer/01_auto_fit.py b/examples/10_normalizer/01_auto_fit.py index e9553405..7654f5a2 100644 --- a/examples/10_normalizer/01_auto_fit.py +++ b/examples/10_normalizer/01_auto_fit.py @@ -22,8 +22,8 @@ import gstools as gs import matplotlib.pyplot as plt -# structured field with a size of 60x60 -x = y = range(60) +# structured field with edge length of 50 +x = y = range(51) pos = gs.tools.geometric.gen_mesh([x, y]) model = gs.Gaussian(dim=2, var=1, len_scale=10) srf = gs.SRF(model, seed=20170519, normalizer=gs.normalizer.LogNormal()) @@ -94,9 +94,9 @@ # of the measurement samples and the field is reconstructed quite accurately. fig, ax = plt.subplots(1, 3, figsize=[8, 3]) -ax[0].imshow(srf.field.reshape(60, 60).T, origin="lower") +ax[0].imshow(srf.field.reshape(len(x), len(y)).T, origin="lower") ax[1].scatter(*cond_pos, c=cond_val) -ax[2].imshow(krige.field.reshape(60, 60).T, origin="lower") +ax[2].imshow(krige.field.reshape(len(x), len(y)).T, origin="lower") # titles ax[0].set_title("original field") ax[1].set_title("sampled field")