Skip to content
Prev 4215 / 63424 Next

symbols: xlim and ylim cannot be specified (PR#639)

stahel@stat.math.ethz.ch wrote:
Suggestion for a fix:


function (x, y, circles, squares, rectangles, stars, thermometers, 
    boxplots, inches = TRUE, add = FALSE, fg = 1, bg = NA, xlab = "", 
    ylab = "", xlim = NULL, ylim = NULL, ...) 
               ^^^^^^^^^^^^^^^^^^^^^^^^^
{
## [...] snip ##
  if (!add) { 
### check, wheter xlim and ylim are already specified:
        if(is.null(xlim)) {
            xlim <- range(x, na.rm = TRUE)
            xlim <- xlim + c(-1, 1) * (0.1 * diff(xlim))
        }
        if(is.null(ylim)) {
            ylim <- range(y, na.rm = TRUE)
            ylim <- ylim + c(-1, 1) * (0.1 * diff(ylim))
        }
        plot(NA, NA, type = "n", ylim = ylim, xlim = xlim, xlab = xlab, 
            ylab = ylab, ...)
    }
    .Internal(symbols(x, y, type, data, inches, bg, fg, ...))
}

Regards,
Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._