On 8/7/09, Jacob Wegelin <jacob.wege...@gmail.com> wrote: > Suppose we wish to achieve the following three aims: > (1) Control the aspect ratio of our plot (i.e., tweak this till it looks > great) > > (2) Save the plot as a PDF with zero or minimal white space outside it. > > (3) Preserve this in code, so that in the future the exact same plot can be > reproduced by simply sourcing the code. > > I can almost achieve (1) and (2) on my MacBook Pro by pointing and clicking, > as follows: > > • Start with graphics.off(). > > • Generate the plot on the computer screen; then the outer margins are > pretty thin by default. > > • Use the mouse to adjust the aspect ratio until it looks right. > > The fact that I pointed and clicked precludes (3).
Once you have resized to a suitable size, use par("din") to find the current dimensions, and then use these as 'width' and 'height' arguments to pdf(). -Deepayan ______________________________________________ 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.