[Gstat-info] Combine plots of variogram
Shaofei Chen
shaofei.chen at utdallas.edu
Wed Mar 25 01:29:10 CET 2009
Thanks, Cristiano
This is awesome! BTW, how to add the simulated semivariogram line to the second plot. In the first plot, we can simply do:
>v1<-variogram(log(x1)~1,data)
>model.1 <- fit.variogram(v1,vgm(1,"Sph",300,1))
>plot(v1, model=model.1)
and then add the points of the second plot
>v2<-variogram(log(x2)~1,data)
>points(v2$dist,v2$gamma, xlab="distance", ylab="semivariance",col="green")
>model.1 <- fit.variogram(v2,vgm(1,"Sph",300,1))
How to add the line? Using lines()? How to set these parameters?
Thanks!
Shaofei
----- Original Message -----
From: facrimas at libero.it
To: shaofei.chen at utdallas.edu ; gstat-info at geo.uu.nl
Sent: Tuesday, March 24, 2009 3:09 PM
Subject: R: [Gstat-info] Combine plots of variogram
Hi Shaofei,
you can adapt this script to your case:
vgm.Cd <- variogram(jura.metals$Cd~1, jura.pred, width=c(0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2), alpha= (0:3) * 45)plot(vgm.Cd1$dist, vgm.Cd1$gamma, xlab="distance(km)", ylab="semiavariogram", col="darkred")
vgm.Cd2 <- variogram(jura.metals$Cd~1, jura.pred, width=c(0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2), alpha=45)
points (vgm.Cd2$dist, vgm.Cd2$gamma, xlab="dist(km)", ylab="semiavariogram", col="3")
Before you create the semivariogram named vgm.Cd and you plot it. later you create a second semivariogram vgm.Cd2 and with the command points you plot the others values.
sorry for my english.
bye.
Cristiano
----Messaggio originale----
Da: shaofei.chen at utdallas.edu
Data: 24/03/2009 19.48
A: <gstat-info at geo.uu.nl>
Ogg: [Gstat-info] Combine plots of variogram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.geo.uu.nl/pipermail/gstat-info/attachments/20090324/c75da054/attachment.html
More information about the Gstat-info
mailing list