Hi,

While xYplot(...) below produces an empty pdf file, plot(...) works fine. The 
same xYplot(...) produces correct output if tried directly in R console. Any 
suggestions?

Thanks,
sp

# empty pdf
trellis.device("pdf", file="./resid1_lat.pdf");
xYplot(resid(f) ~ fitted(f), method='quantile', nx=20,
       ylim=c(-100,250), xlim = c(-25,150),
       abline=list(h=0, lwd=0.5, lty=2),
       xlab="Fitted Values [lat]",
       ylab="Residuals [lat]")
dev.off();

# non-empty pdf
trellis.device("pdf", file="./resid1_lat.pdf");
plot(resid(f) ~ fitted(f), method='quantile', nx=20,
       ylim=c(-100,250), xlim = c(-25,150),
       abline=list(h=0, lwd=0.5, lty=2),
       xlab="Fitted Values [lat]",
       ylab="Residuals [lat]");
dev.off();

______________________________________________
R-help@r-project.org 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