# This code is modified from the filled.contour routine provided by the R basic install # The key of the contour plot is removed along with the rescaling statements keylessfilled.contour <- function (x = seq(0, 1, len = nrow(z)), y = seq(0, 1, len = ncol(z)), z, xlim = range(x, finite=TRUE), ylim = range(y, finite=TRUE), zlim = range(z, finite=TRUE), levels = pretty(zlim, nlevels), nlevels = 20, color.palette = cm.colors, col = color.palette(length(levels) - 1), plot.title, plot.axes, key.title, key.axes, asp = NA, xaxs="i", yaxs="i", las = 1, axes = TRUE, frame.plot = axes, ...) { if (missing(z)) { if (!missing(x)) { if (is.list(x)) { z <- x$z y <- x$y x <- x$x } else { z <- x x <- seq(0, 1, len = nrow(z)) } } else stop("no 'z' matrix specified") } else if (is.list(x)) { y <- x$y x <- x$x } if (any(diff(x) <= 0) || any(diff(y) <= 0)) stop("increasing 'x' and 'y' values expected") ## Plot the 'plot key' (scale): # plot.new() ## Plot contour-image:: plot.new() plot.window(xlim, ylim, "", xaxs=xaxs, yaxs=yaxs, asp=asp) if (!is.matrix(z) || nrow(z) <= 1 || ncol(z) <= 1) stop("no proper 'z' matrix specified") if (!is.double(z)) storage.mode(z) <- "double" .Internal(filledcontour(as.double(x), as.double(y), z, as.double(levels), col = col)) if (missing(plot.axes)) { if (axes) { title(main="", xlab="", ylab="") Axis(x, side=1) Axis(y, side=2) } } else plot.axes if (frame.plot) box() if (missing(plot.title)) title(...) else plot.title invisible() }