[R] good procedure for creating plots for PowerPoint

Henrik Bengtsson hb at maths.lth.se
Wed May 8 08:03:20 CEST 2002


You can use the par() options. Note that you have to set them every time you
open up a new device. Here are the settings I have found to be useful:

setPowerPointStyle <- function() {
    par(font=BOLD);
    par(font.axis=BOLD);
    par(font.lab=BOLD);
    par(font.main=BOLD);
    par(font.sub=NORMAL);
    par(cex=1.2);
    par(cex.axis=1.2);
    par(cex.lab=1.2);
    par(cex.main=1.4);
    par(cex.sub=1.2);
    par(col="black");
    par(col.axis="black");
    par(col.lab="black");
    par(col.main="black");
    par(col.sub="black");
    par(lwd=2);
    par(pch=1);
    par(ps=12);
    par(tmag=1.2);
    par(mar=c(4, 3, 3, 1) + 0.1);
    par(mgp=c(1.5, 0.2, 0));
    par(tcl=0.3);
}

Then I save the pictures to PNG format with 'width=5' and 'height=5',
pointsize='14'.

Cheers

Henrik Bengtsson

Dept. of Mathematical Statistics @ Centre for Mathematical Sciences
Lund Institute of Technology/Lund University, Sweden (+2h UTC)
Office: P316, +46 46 222 9611 (phone), +46 46 222 4623 (fax)
h b @ m a t h s . l t h . s e, http://www.maths.lth.se/bioinformatics/


> -----Original Message-----
> From: owner-r-help at stat.math.ethz.ch
> [mailto:owner-r-help at stat.math.ethz.ch]On Behalf Of Russell Senior
> Sent: Wednesday, May 08, 2002 1:38 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] good procedure for creating plots for PowerPoint
>
>
>
> I am generating some graphs (on GNU/Linux using R 1.5.x) for a
> PowerPoint presentation my boss is giving next week.  He just tried
> cut/pasted a plot off of a PDF file I had created, but he complained
> that the fonts were too small and fuzzy, and that he couldn't change
> the background.  I have been playing with png(bg=transparent), but I
> am not sure what appropriate height,width parameters and whether I
> should modify my plot colors.  Any pointers on generating good quality
> figures for PowerPoint?
>
> Thanks!
>
> --
> Russell Senior         ``The two chiefs turned to each other.
> seniorr at aracnet.com      Bellison uncorked a flood of horrible
>                          profanity, which, translated meant, `This is
>                          extremely unusual.' ''
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.-.-.-
> r-help mailing list -- Read
> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._._._._._
>
>

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list