[R-sig-Geo] directional semivariograms on the same graph

Mauricio Zambrano hzambran.newsgroups at gmail.com
Mon Oct 8 14:38:02 CEST 2007


R.2.5.1 and gstat 0.9-39.
--------------------------------

Hi,

Does anybody knows how to plot two or more semivariogams on the same
graph ?, I mean, only one x axis and only one Y axis and between them,
 2 or more directional semivariograms ?.

I defined:

jura.pred.xy <- jura.pred
names(jura.pred.xy)[1:2] <- c("x", "y")
coordinates(jura.pred.xy) <- ~x+y

and after I tried with:

Zn.vgm <- variogram(Zn~1, jura.pred.xy, alpha=c(22.5, 67.5, 112.5,
157.5), cutoff=2,  boundaries=c(0.1, 0.2*(1:10)), tol.hor=22.5)
plot(Zn.vgm, type="b", as.table=TRUE, main='Zn data', panel=panel.superpose)

but I got:
plot(Zn.vgm, type="b", as.table=TRUE, main='Zn data', panel=panel.superpose)

After I tried with:

Zn.vgm1 <- variogram(Zn~1, jura.pred.xy, alpha=c(22.5), cutoff=2,
boundaries=c(0.1, 0.2*(1:10)), tol.hor=22.5)
Zn.vgm2 <- variogram(Zn~1, jura.pred.xy, alpha=c(67.5), cutoff=2,
boundaries=c(0.1, 0.2*(1:10)), tol.hor=22.5)

plot(Zn.vgm1, type="b", as.table=TRUE, main='Zn data, Alpha=22.5º')
plot(Zn.vgm2, type="b", as.table=TRUE, main='Zn data, Alpha=67.5º', add=TRUE)

but only remains the second graph.

Thanks in advance

Mauricio




More information about the R-sig-Geo mailing list