Skip to content

Commit

Permalink
update the cov-model example [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Oct 1, 2019
1 parent fdd7a97 commit 86781fa
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions examples/03_cov_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))

Expand Down Expand Up @@ -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")

0 comments on commit 86781fa

Please sign in to comment.