[R] strange error
Duncan Murdoch
murdoch.duncan at gmail.com
Wed May 25 22:07:06 CEST 2016
On 25/05/2016 12:56 PM, alicekalkuhl at freenet.de wrote:
> Hello everyone,
> almost every time I try to plot something R gives me the following mistake:
> Error in plot.new() : figure margins too large
> One example would be, when I tried to run a function, somebody published to create a Lorenz Attractor:
>
> parameters <- c(s = 10, r = 28, b = 8/3) state <- c(X = 0, Y = 1, Z = 1)
> Lorenz <- function(t, state, parameters) { with(as.list(c(state, parameters)), { dX <- s * (Y - X) dY <- X * (r - Z) - Y dZ <- X * Y - b * Z list(c(dX, dY, dZ)) }) }
> times <- seq(0, 50, by = 0.01) library(deSolve) out <- ode(y = state, times = times, func = Lorenz, parms = parameters)
> par(oma = c(0, 0, 3, 0)) plot(out, xlab = "time", ylab = "-") plot(out[, "Y"], out[, "Z"], pch = ".", type = "l") mtext(outer = TRUE, side = 3, "Lorenz model", cex = 1.5)
>
> It turns out to be really problematic, because there are barely functions I can plot.
> My version of RStudio is R version 3.2.3 (2015-12-10) -- "Wooden Christmas Tree" and my computer uses Windows 8.1.
> Would it be possible to avoid the problem by using Windows 10?
> Or is there anything else I can do?
This is an RStudio problem, not an R problem. One solution is to make
the "Plots" pane bigger. There may be others -- you'll have to contact
RStudio for help with it.
Duncan Murdoch
More information about the R-help
mailing list