[R] Using graphics straight from R into published articles

Rainer M Krug r.m.krug at gmail.com
Wed Mar 30 10:22:05 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29/03/11 19:52, Philipp Pagel wrote:
> On Tue, Mar 29, 2011 at 09:31:18AM -0700, blanco wrote:
>> I was just wondering if people use graphics from R straight into articles or
>> are they always edited  in some way; fonts, headers, axis, color etc?  Using
>> photoshop or some other programs?
>>
>> I would like to think it is possible, better and more profession to do it
>> all in R.

Absolutely. You can get one paper = one file (if you want to, including
your data - but usually that one is separate) when you use e.g. sweave
or org-mode babel (http://orgmode.org/,
http://orgmode.org/worg/org-contrib/babel/) - all graphs are generated
when you compile your document. I use org-mode.

>> I tried google and the search option but found nothing on the topic.  
>>
>> What are the experiences for all the professionals out there that use R?
>> Are there any articles on this specific subject?
> 
> I'm not aware of any articles on the topic but I can share what I do:
> 
> 95% of the time I tweak various graphics parameters in R and see no
> necessity for postprocessing in other applications.

Up to now, even 100%

> 
> In about 5% I do some manual editing for a "camera ready" figure.
> These are usually the result of exotic request from referees. But
> under no circumstances would I use Photoshop or any other pixel
> graphics software for this. My R graphics are always created as eps or
> pdf vector graphics and any editing is done with a proper vector
> graphics software (Illustrator or Inkscape).

Absolutely vector - no jpeg, png, ... although it takes sometimes some
convincing of co-authors...

> 
> I share your feeling that it is better to do as much as possible in R
> because it means that I won't have to do it again if I need to produce
> another revision of the figure - all it takes is anoother run of my
> script. And I can re-use good solutions in the future. Any manual
> touch-ups have to be done manually every single time => not my idea of
> efficiency.

Absolutely - reproducible research. And if you have several graphs, they
all share the same layout, font, fontsize, margins, ...

I rather spend an hour fiddling on my graphs in R (and sometimes
swearing about the layout of multiple graphs in one figure) then spend
half an hour "painting" my graphs.

Cheers,

Rainer

> 
> cu
> 	Philipp
> 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:        +33 - (0)9 53 10 27 44
Cell:       +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:      Rainer at krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2S6CwACgkQoYgNqgF2egpvFgCfewRlqSfz+RSGmxcn15I4H9Yh
riUAn2KzUCS8wD55HFQy+M6O5QRf0yIr
=v8nN
-----END PGP SIGNATURE-----



More information about the R-help mailing list