Hi, I have been working with R for the past couple of years; analyzing data and producing some graphics. 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. 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? thanks, blanco -- View this message in context: http://r.789695.n4.nabble.com/Using-graphics-straight-from-R-into-published-articles-tp3415401p3415401.html Sent from the R help mailing list archive at Nabble.com.
Jonathan P Daily
2011-Mar-29 17:22 UTC
[R] Using graphics straight from R into published articles
I think you should google search Sweave, as well as check out the ?Sweave page. Not to mention the graphics devices that embed quite nicely into documents, like ?postscript. HTH, Jon -------------------------------------- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 "Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it." - Jubal Early, Firefly r-help-bounces at r-project.org wrote on 03/29/2011 12:31:18 PM:> [image removed] > > [R] Using graphics straight from R into published articles > > blanco > > to: > > r-help > > 03/29/2011 12:44 PM > > Sent by: > > r-help-bounces at r-project.org > > Hi, > I have been working with R for the past couple of years; analyzing dataand> producing some graphics. > > I was just wondering if people use graphics from R straight intoarticles 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 doit> all in R. > 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? > > thanks, > blanco > > -- > View this message in context: http://r.789695.n4.nabble.com/Using- > graphics-straight-from-R-into-published-articles-tp3415401p3415401.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 guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
Philipp Pagel
2011-Mar-29 17:52 UTC
[R] Using graphics straight from R into published articles
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. > 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. 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). 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. cu Philipp -- Dr. Philipp Pagel Lehrstuhl f?r Genomorientierte Bioinformatik Technische Universit?t M?nchen Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/
Philipp Pagel
2011-Mar-30 09:12 UTC
[R] Using graphics straight from R into published articles
On Wed, Mar 30, 2011 at 08:48:55AM +0000, ONKELINX, Thierry wrote:> Large snip. > > > Absolutely vector - no jpeg, png, ... although it takes > > That depends on the kind of graph. I aggree that you should try > vector at first. But when it generates very larges files (e.g. > scatterplots with thousands of points) then you better switch to > bitmaps like tiff or png. Jpeg can create artefacts, so is not very > good for graphics.True. Sometimes one can get away with switching from a normal scatterplot to hexbin or something like this but if that is not anoption a high resolution tiff or png is the way out. And of course, I agree that jpeg should never be used for graphs. cu Philipp -- Dr. Philipp Pagel Lehrstuhl f?r Genomorientierte Bioinformatik Technische Universit?t M?nchen Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/
Rainer M Krug
2011-Mar-30 09:24 UTC
[R] Using graphics straight from R into published articles
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 30/03/11 11:12, Philipp Pagel wrote:> On Wed, Mar 30, 2011 at 08:48:55AM +0000, ONKELINX, Thierry wrote: >> Large snip. >> >>> Absolutely vector - no jpeg, png, ... although it takes >> >> That depends on the kind of graph. I aggree that you should try >> vector at first. But when it generates very larges files (e.g. >> scatterplots with thousands of points) then you better switch to >> bitmaps like tiff or png. Jpeg can create artefacts, so is not very >> good for graphics. > > True. Sometimes one can get away with switching from a normal > scatterplot to hexbin or something like this but if that is not > anoption a high resolution tiff or png is the way out.Well - is there a rule without an exception? Of course - you are right. Cheers, Rainer> > And of course, I agree that jpeg should never be used for graphs. > > 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/ iEUEARECAAYFAk2S9rkACgkQoYgNqgF2egpp2ACcCrToeRM2OWPBVAs99Q/u0c/z Vl8AmKoP0l2RR+EyL+VVlYM2S+hQdhw=hKPu -----END PGP SIGNATURE-----
Wow - thanks all for your helpful replies. Awesome forum. Am I right to assume that you use the postscript function to create .ps and .pdf files from R? blanco -- View this message in context: http://r.789695.n4.nabble.com/Using-graphics-straight-from-R-into-published-articles-tp3415401p3418682.html Sent from the R help mailing list archive at Nabble.com.
David Winsemius
2011-Mar-30 19:31 UTC
[R] Using graphics straight from R into published articles
On Mar 30, 2011, at 11:56 AM, blanco wrote:> Wow - thanks all for your helpful replies. Awesome forum. > > Am I right to assume that you use the postscript function to > create .ps and > .pdf files from R?No, just .ps and .eps files. The pdf() functon is for the obvious purposes. ?Devices ?capabilities -- David Winsemius, MD Heritage Laboratories West Hartford, CT
baptiste auguie
2011-Mar-30 20:24 UTC
[R] Using graphics straight from R into published articles
Hi, For most purposes, I find that R graphics get 95% of the work done towards final publication. A couple of personal comments, - lattice, ggplot2, RColorBrewer, evidently. ggplot2, in particular, makes really good aesthetic decisions by default. - whilst R devices are really good, I find there is not yet a perfect device that combines all the features I need; thus, I may choose between pdf, eps (when the editor is old-school), tikzDevice (when the graph contains labels or mathematical expressions not well rendered by the R graphics engine). I used to use png for large colour-scale image()s, but I find recently that the rasterImage / grid.raster functions offer a better alternative on devices that support it (typically pdf, but not yet tikzDevice). - I find there is a fine trade-off between having a fully-reproducible graph from a script (a good thing), and the legibility of that script if it has to include all the tedious fiddling with that may be required for final publication. I produced lattice graphs in the past that required more than ten lines of code, and found the code really difficult to follow or reuse later if, say, the coordinates range of the data had changed. If the script grows too large because I need to tweak the coordinates of many annotations manually by trial-and-error, I usually strip down the graph to its minimal content and add the annotations manually in Illustrator. The data and its mapping to the axes are always fully reproducible (that's the important part), but aesthetic decisions are often easier to control in a what-you-click-is-what-you-do program. My 2 cents, baptiste On 30 March 2011 05:31, blanco <benjamin at ru.is> wrote:> Hi, > I have been working with R for the past couple of years; analyzing data and > producing some graphics. > > 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. > 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? > > thanks, > blanco > > -- > View this message in context: http://r.789695.n4.nabble.com/Using-graphics-straight-from-R-into-published-articles-tp3415401p3415401.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. >