swh:1:snp:33a53053e50f7abe7d281cc0c803be827debf4a3
Raw File
Tip revision: ae42623708becf61734bc74f16126dad36e203c1 authored by Edzer J. Pebesma on 02 February 2004, 16:39:05 UTC
version 0.9-10
Tip revision: ae42623
vgm.dir.panel.xyplot.R
"vgm.dir.panel.xyplot" <-
function (x, y, subscripts, type = "p", pch = plot.symbol$pch, 
    col, col.line = plot.line$col, col.symbol = plot.symbol$col, 
    lty = plot.line$lty, cex = plot.symbol$cex, lwd = plot.line$lwd, 
    model = model, dir.hor = dir.hor, labels, ...) 
{
    x <- as.numeric(x)
    y <- as.numeric(y)
    if (length(x) > 0) {
        if (!missing(col)) {
            if (missing(col.line)) 
                col.line <- col
            if (missing(col.symbol)) 
                col.symbol <- col
        }
        plot.symbol <- trellis.par.get("plot.symbol")
        plot.line <- trellis.par.get("plot.line")
        lpoints(x = x, y = y, cex = cex, col = col.symbol, pch = pch)
        if (!missing(model) && !is.null(model)) {
            if (!missing(dir.hor)) {
                ang <- dir.hor[subscripts]
                ang.pi <- pi * (ang[1]/180)
                dir <- c(sin(ang.pi), cos(ang.pi), 0)
            }
            else dir <- c(1, 0, 0)
            ret <- variogram.line(model, max = max(x), dir = dir)
            llines(x = ret$dist, y = ret$gamma, lty = lty, col = col.line, 
                lwd = lwd)
        }
		if(!is.null(labels))
			ltext(x + 0.05 * max(x), y, labels = labels[subscripts])
    }
}
back to top