pdf.graph() creates a new graphics device instance, and plot() etc commands
will draw to it. You didn't plot anything on the newly created device,
hence the empty file.
You can use export.graph() to export the current page of a graphsheet().
Look at its help page. However, I don't think there's an option to produce
pdf output. You could produce eps output, and then use a program like gs
to convert that to a pdf.
(You could try using dev.copy() to copy the current graph to a new device,
but I can't get dev.copy() to copy anything but the last page in a
multi-page graphsheet.)
-- Tony
Data Analytics Corp. wrote:
Good morning,
I want to do something very simple. I created a function to produce
multiple graphs, say 25. All 25 are visible as separate pages. Using
some previous suggestions for how to move about the pages
programmatically, I can write another function to select specific pages,
say page 15. I now want to print that specific page to a pdf file. The
function I tried is:
fn.pdf <- function(){
pdf.graph(file = "test.pdf")
guiModify("GraphSheet", Name = "guiGetGSName(), CurrentPage = "Page15")
guiPrint("GraphSheet")
dev.off()
}
The file test.pdf is created, but it's empty. How do I print page 15 to
the pdf file? Any suggestions?
Thanks,
Walt Paczkowski
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message: unsubscribe s-news
|