Karl Knoblick wrote:

Thanks, but it does NOT work using a loop (your
example without loop works):

trellis.device("postscript", file = "PSFile.ps")
for (i in 1:1)
{
  plot(Loblolly)
}
dev.off()


Yep, sorry. You need to print() a lattice plot in this case:

trellis.device("postscript", file = "PSFile.ps")
for (i in 1:1)
{
  print(plot(Loblolly))
}
dev.off()


Uwe Ligges



Just an empty postscript file.

Karl.

--- Uwe Ligges <[EMAIL PROTECTED]> :>

Note that this is a lattice plot:

class(Loblolly)
[1] "nfnGroupedData" "nfGroupedData" "groupedData" "data.frame"


Thus, the method plot.nfnGroupedData() producing a
lattice plot is called by the generic plot().


So, you don't want to start postscript(), but
 trellis.device("postscript", file = "PSFile.ps")
 plot(Loblolly)
 dev.off()

Uwe Ligges




__________________________________________________________________


Gesendet von Yahoo! Mail - http://mail.yahoo.de
Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de

______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to