[R-sig-Geo] Multiple variograms in one graph
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Thu Sep 3 18:11:19 CEST 2009
ageel bushara wrote:
> Dear all,
>
> Â
>
> I’m a new user of R. I
> have two plots of variograms. Each plot shows the experimental variograms with its
> fitted theoretical variograms. I would like to have the two plots in one graph
> (all experimental and theoretical variograms will be in one graph). How can I
> do it?
>
easiest to use basic plot:
library(gstat)
data(meuse)
coordinates(meuse)=~x+y
v1 = variogram(log(zinc)~1,meuse)
v2 = variogram(log(cadmium)~1,meuse)
m1 = fit.variogram(v1, vgm(1, "Sph", 800, 1))
m2 = fit.variogram(v2, vgm(1, "Sph", 800, 1))
plot(gamma~dist, v2, ylim = c(0, 1.05*max(v2$gamma)),col='red', ylab =
'semivariance', xlab = 'distance')
lines(variogramLine(m2, 1500), col='red')
points(gamma~dist, v1, col='blue')
lines(variogramLine(m1, 1500), col='blue')
> Â
>
> Thanks,
>
> Ageel
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de/
http://www.springer.com/978-0-387-78170-9 e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list