Skip to content
Back to formatted view

Raw Message

Message-ID: <20040220004900.32636.qmail@web12101.mail.yahoo.com>
Date: 2004-02-20T00:49:00Z
From: Adi Humbert
Subject: Does pdf() not work on Trellis graphics?

Hello, 

I have the following example. 

testpdf <- function(x,y){
  pdf()
  #plot(x,y)
  xyplot(x~y)
  dev.off()
}


source("testpdf.R")
x=1:1000
testpdf(x,x)

with "xyplot", the output is a file that can not be
read because it has no pages.  With "plot" it works
fine.  If I do it manually (from the GUI menu), it
works even for "xyplot".  How can I save it
automatically, without the GUI? 

I use R 1.8.0 on WinXP. 

Thank you, 
Adrian Dragulescu