@@ -217,12 +217,12 @@ p1 = GaussianProcess(GaussianVariogram(range=10.0))
217217p2 = GaussianProcess(GaussianVariogram(range=30.0))
218218
219219Random.seed!(2023)
220- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
221- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
220+ d1 = rand(p1, g)
221+ d2 = rand(p2, g)
222222
223223fig = Mke.Figure()
224- viz(fig[1,1], d1.geometry, color = d1.Z , axis = (; title="range: 10"))
225- viz(fig[2,1], d2.geometry, color = d2.Z , axis = (; title="range: 30"))
224+ viz(fig[1,1], d1.geometry, color = d1.field , axis = (; title="range: 10"))
225+ viz(fig[2,1], d2.geometry, color = d2.field , axis = (; title="range: 30"))
226226fig
227227```
228228
@@ -243,14 +243,14 @@ p1 = GaussianProcess(GaussianVariogram(range=10.0, sill=1.0))
243243p2 = GaussianProcess(GaussianVariogram(range=10.0, sill=9.0))
244244
245245Random.seed!(2023)
246- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
247- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
246+ d1 = rand(p1, g)
247+ d2 = rand(p2, g)
248248
249249f(x) = ustrip(first(to(centroid(x))))
250250
251251fig = Mke.Figure()
252- Mke.lines(fig[1,1], f.(d1.geometry), d1.Z , color = "black", axis = (; title="sill: 1"))
253- Mke.lines(fig[2,1], f.(d2.geometry), d2.Z , color = "black", axis = (; title="sill: 9"))
252+ Mke.lines(fig[1,1], f.(d1.geometry), d1.field , color = "black", axis = (; title="sill: 1"))
253+ Mke.lines(fig[2,1], f.(d2.geometry), d2.field , color = "black", axis = (; title="sill: 9"))
254254fig
255255```
256256
@@ -273,14 +273,14 @@ p1 = GaussianProcess(GaussianVariogram(range=10.0, nugget=0.1))
273273p2 = GaussianProcess(GaussianVariogram(range=10.0, nugget=0.2))
274274
275275Random.seed!(2023)
276- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
277- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
276+ d1 = rand(p1, g)
277+ d2 = rand(p2, g)
278278
279279f(x) = ustrip(first(to(centroid(x))))
280280
281281fig = Mke.Figure()
282- Mke.lines(fig[1,1], f.(d1.geometry), d1.Z , color = "black", axis = (; title="nugget: 0.1"))
283- Mke.lines(fig[2,1], f.(d2.geometry), d2.Z , color = "black", axis = (; title="nugget: 0.2"))
282+ Mke.lines(fig[1,1], f.(d1.geometry), d1.field , color = "black", axis = (; title="nugget: 0.1"))
283+ Mke.lines(fig[2,1], f.(d2.geometry), d2.field , color = "black", axis = (; title="nugget: 0.2"))
284284fig
285285```
286286
@@ -294,13 +294,13 @@ p1 = GaussianProcess(GaussianVariogram(range=10.0, nugget=0.0))
294294p2 = GaussianProcess(GaussianVariogram(range=10.0, nugget=0.1))
295295
296296Random.seed!(2023)
297- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
297+ d1 = rand(p1, g)
298298Random.seed!(2023)
299- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
299+ d2 = rand(p2, g)
300300
301301fig = Mke.Figure()
302- viz(fig[1,1], d1.geometry, color = d1.Z , axis = (; title="nugget: 0.0"))
303- viz(fig[2,1], d2.geometry, color = d2.Z , axis = (; title="nugget: 0.1"))
302+ viz(fig[1,1], d1.geometry, color = d1.field , axis = (; title="nugget: 0.0"))
303+ viz(fig[2,1], d2.geometry, color = d2.field , axis = (; title="nugget: 0.1"))
304304fig
305305```
306306
@@ -325,13 +325,9 @@ geospatial correlation. The most widely used are the `GaussianVariogram`, the
325325γ2 = SphericalVariogram()
326326γ3 = ExponentialVariogram()
327327
328- fig = Mke.Figure()
329- Mke.Axis(fig[1,1])
330- varioplot!(γ1, maxlag=2.0, color = "teal", label = "Gaussian")
331- varioplot!(γ2, maxlag=2.0, color = "slategray3", label = "Spherical")
332- varioplot!(γ3, maxlag=2.0, color = "brown", label = "Exponential")
333- Mke.axislegend("Model", position = :rb)
334- fig
328+ fig = funplot(γ1, maxlag=2.0, color = "teal")
329+ funplot!(fig, γ2, maxlag=2.0, color = "slategray3")
330+ funplot!(fig, γ3, maxlag=2.0, color = "brown")
335331```
336332
337333The faster is the increase of the function near the origin, the more "erratic" is the process:
@@ -345,14 +341,14 @@ p2 = GaussianProcess(SphericalVariogram(range=10.0))
345341p3 = GaussianProcess(ExponentialVariogram(range=10.0))
346342
347343Random.seed!(2023)
348- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
349- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
350- d3 = rand(p3, g, [:Z => Float64], LUMethod() )
344+ d1 = rand(p1, g)
345+ d2 = rand(p2, g)
346+ d3 = rand(p3, g)
351347
352348fig = Mke.Figure()
353- viz(fig[1,1], d1.geometry, color = d1.Z , axis = (; title="model: Gaussian"))
354- viz(fig[2,1], d2.geometry, color = d2.Z , axis = (; title="model: Spherical"))
355- viz(fig[3,1], d3.geometry, color = d3.Z , axis = (; title="model: Exponential"))
349+ viz(fig[1,1], d1.geometry, color = d1.field , axis = (; title="model: Gaussian"))
350+ viz(fig[2,1], d2.geometry, color = d2.field , axis = (; title="model: Spherical"))
351+ viz(fig[3,1], d3.geometry, color = d3.field , axis = (; title="model: Exponential"))
356352fig
357353```
358354
@@ -419,7 +415,7 @@ g = EmpiricalVariogram(img, :Z, maxlag = 50.0)
419415```
420416
421417``` {julia}
422- varioplot (g)
418+ funplot (g)
423419```
424420
425421::: {.callout-note}
@@ -437,27 +433,26 @@ specific directions:
437433gₕ = DirectionalVariogram((1.0, 0.0), img, :Z, maxlag = 50.0)
438434gᵥ = DirectionalVariogram((0.0, 1.0), img, :Z, maxlag = 50.0)
439435
440- varioplot(gₕ, showhist = false, color = "maroon")
441- varioplot!(gᵥ, showhist = false, color = "slategray")
442- Mke.current_figure()
436+ fig = funplot(gₕ, showhist = false, color = "maroon")
437+ funplot!(fig, gᵥ, showhist = false, color = "slategray")
443438```
444439
445440In this example, we observe that the blobs are elongated with a horizontal
446441range of 30 pixels and a vertical range of 10 pixels. This is known as
447442geometric ** anisotropy** .
448443
449444We can also estimate the variogram in all directions on a plane with the
450- ` EmpiricalVarioplane ` :
445+ ` EmpiricalVariogramSurface ` :
451446
452447``` {julia}
453- gₚ = EmpiricalVarioplane (img, :Z, maxlag = 50.0)
448+ gₚ = EmpiricalVariogramSurface (img, :Z, maxlag = 50.0)
454449```
455450
456- The varioplane is usually plotted on a polar axis to highlight the different
457- ranges as a function of the polar angle:
451+ The variogram surface is usually plotted on a polar axis to highlight the
452+ different ranges as a function of the polar angle:
458453
459454``` {julia}
460- planeplot (gₚ)
455+ surfplot (gₚ)
461456```
462457
463458::: {.callout-note}
0 commit comments