From 86781faf7eb69843d55379d18d865ef125edc9a1 Mon Sep 17 00:00:00 2001 From: MuellerSeb Date: Tue, 1 Oct 2019 18:49:52 +0200 Subject: [PATCH] update the cov-model example [skip ci] --- examples/03_cov_model.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/examples/03_cov_model.py b/examples/03_cov_model.py index 411349d5..9101c360 100644 --- a/examples/03_cov_model.py +++ b/examples/03_cov_model.py @@ -9,9 +9,7 @@ def correlation(self, r): model = Gau(dim=2, var=2.0, len_scale=10) -from gstools.covmodel.plot import plot_variogram - -plot_variogram(model) +model.plot() print(model.dim, model.var, model.len_scale, model.nugget, model.sill) model.dim = 3 @@ -34,7 +32,6 @@ def correlation(self, r): model = Gau(dim=3, var=2.0, len_scale=10, nugget=0.5) print(model.variogram(10.0)) -print(model.variogram_normed(10.0)) print(model.covariance(10.0)) print(model.correlation(10.0)) @@ -79,9 +76,6 @@ def correlation(self, r): model.set_arg_bounds(alpha=[0, 3]) results, pcov = model.fit_variogram(x, y, nugget=False) print(results) -from matplotlib import pyplot as plt -plt.cla() -plt.scatter(x, y, color="k") -plot_variogram(model) -plt.show() +ax = model.plot() +ax.scatter(x, y, color="k")