Thank you Erik!

That works nicely now. The file size in (in kilobytes) is equal to the "File>Save As>PDF" method.

Still curious why the file sizes (in Kb), differ by a factor of ~2 between the two methods:

pdf()
dev2bitmap(method = "pdf")

I'm just *assuming* here that file size is inidcative of image quality. Is this assumption correct? If so, how would one increase .pdf quality within the dev2bitmap() function?

With thanks for any further thoughts on this, cheers,

Karl



On 6/30/2010 4:58 PM, Erik Iverson wrote:


Method 3:
> pdf(file="my_plot.pdf", paper="a4")
> dev.off()

The `pdf` function opens a *new* graphics device, you then send output
to the device before calling dev.off(), e.g.,

pdf(file = my_plot.pdf")
plot(1:10, 1:10)
dev.off()



-yields a .pdf file of 1kb (same plot example) and returns the
following error when attempting to open with Adobe acrobat:

"There was an error opening this document. This file cannot be opened
because it has no pages."

--
Karl Brand <k.br...@erasmusmc.nl>
Department of Genetics
Erasmus MC
Dr Molewaterplein 50
3015 GE Rotterdam
P +31 (0)10 704 3409 | F +31 (0)10 704 4743 | M +31 (0)642 777 268

______________________________________________
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