[R] set size of a plot

Christos Hatzis christos.hatzis at nuverabio.com
Thu Mar 12 15:28:03 CET 2009


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: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Maxl18
> Sent: Thursday, March 12, 2009 10:05 AM
> To: r-help at r-project.org
> 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.
> 
> ______________________________________________
> R-help at 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.
> 
>




More information about the R-help mailing list