Re: [R] Set size of plot: in pdf() or par() ?

2011-02-23 Thread Matthieu Stigler
Dear R List Could I ask again my question about where the size of a plot should be specified (in par or pdf?). I still did not figure out, and any help would be much appreciated!! Thanks a lot! Matthieu Le 22. 02. 11 13:53, Matthieu Stigler a écrit : Hi I want to have a rectangular plot

Re: [R] Set size of plot: in pdf() or par() ?

2011-02-23 Thread Ista Zahn
It should be specified in pdf() as you did. If you try pdf(try.pdf, height=2, width=2) par(pin=c(0.5, 0.3),mai=rep(0.1,4), omi=rep(0.01,4), mar=c(5,4,4,2)) plot(runif(100)) dev.off() I think the problem will become apparent. best, Ista On Wed, Feb 23, 2011 at 12:39 PM, Matthieu Stigler

Re: [R] Set size of plot: in pdf() or par() ?

2011-02-23 Thread Matthieu Stigler
Dear Ista Thanks a lot for your help! However, when I spedify the right size I wish (the same as specified in par() ) I get an error: pdf(try.pdf, height=0.5, width=0.3) par(pin=c(0.5, 0.3),mai=rep(0.1,4), omi=rep(0.01,4), mar=c(5,4,4,2)) plot(runif(100)) dev.off() I don't see why my

Re: [R] Set size of plot: in pdf() or par() ?

2011-02-23 Thread David Winsemius
On Feb 23, 2011, at 8:32 AM, Matthieu Stigler wrote: Dear Ista Thanks a lot for your help! However, when I spedify the right size I wish (the same as specified in par() ) I get an error: pdf(try.pdf, height=0.5, width=0.3) par(pin=c(0.5, 0.3),mai=rep(0.1,4), omi=rep(0.01,4),

Re: [R] Set size of plot: in pdf() or par() ?

2011-02-23 Thread Mark Difford
On Feb 23, 2011; 03:32pm Matthieu Stigler wrote: I want to have a rectangular plot of size 0.5*0.3 inches. I am having surprisingly a difficult time to do it... ...snip... If I specifz this size in pdf(), I get an error... pdf(try.pdf, height=0.3, width=0.5) par(pin=c(0.5,

Re: [R] Set size of plot: in pdf() or par() ?

2011-02-23 Thread Matthieu Stigler
Thanks Mark! But how does the resulting plot look like on your machine? For me, it is terrible... I tried then removing the mai par (to 0.01), and then got huge circles... It looks like there are many more parameters, I changed then cex, got better but still many adjustments... seems a

Re: [R] Set size of plot: in pdf() or par() ?

2011-02-23 Thread Peter Ehlers
Matthieu, A couple of points that you may be misunderstanding: 1. your 'mar' setting overwrites the 'mai' setting; use one or the other. 2. pdf(width=0.5, height=0.3) sets the *device* region dimensions, not the *plot* region. The thing to remember is that device contains figure contains plot.