[R] plot problem

From: Daniil Ivanov <daniil.ivanov_at_gmail.com>
Date: Mon 21 Aug 2006 - 06:45:44 EST


Hello.

I'm pretty much new to R and I'm trying to produce some figures. It seems to me, that R has some asynchronous way of plotting figures. When I run this code:

#constructs the semivariogram of SC1929
vgm1 <- variogram(SC1929~1,~U+V,puerto.map$att.data)

# trying to make new plot
dev.set(which=dev.next())
plot(vgm1)
title(main="Semivariogram",font.main=4)
dev.copy2eps(file="fig2.eps",horizontal=T) dev.off()

R complains that
Error in title(main = "Semivariogram", font.main = 4) :

        plot.new has not been called yet

So that plot(..) hasn't been executed before call of title.

The most weird about that, if I add fix(vgm1) before dev.set(...), everything is just fine. Why R can't just perform commands one by one?
P.S. I use Linux version of R.

Thanks, Daniil.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon Aug 21 08:05:01 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 21 Aug 2006 - 10:23:20 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.