See ?pdf and its width and height arguments.
Also if you want to have the graph centered on a standard page, there are
additional arguments to help you achieve that effect:
> pdf("test.pdf", height=5, width=5, paper="letter", pagecentre=TRUE)
> hist(rcauchy(100))
> dev.off()
-Christos
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Maxl18
> Sent: Thursday, March 12, 2009 10:05 AM
> To: [email protected]
> Subject: [R] set size of a plot
>
>
> Hi,
> I have the following R-code:
>
> pdf(file="test.pdf")
> hist(rcauchy(100))
> dev.off()
>
> How can I set the size of the histogram in my pdf?
> I tried to do with par(...) but I didn't find the right parameter yet.
>
> Thanks, Max
> --
> View this message in context:
> http://www.nabble.com/set-size-of-a-plot-tp22477083p22477083.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [email protected] 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.
>
>
______________________________________________
[email protected] 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.