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.

Reply via email to