[R-sig-eco] Publication quality graphics in R

Krzysztof Sakrejda-Leavitt krzysztof.sakrejda at gmail.com
Fri May 30 23:58:46 CEST 2008


Hi Mark,

I second writing to files as David says, but I have a few things to add:

- jpg is meant to encode photos, and because of the compression it uses 
it will butcher complicated text, especially if you have to re-save 
multiple times, resize the images, etc...  PNG avoids this problem but 
still compresses photo-like images nicely (say colored 3-D plots).  MS 
Office will definitely accept PNG.

- postscript is probably best for simpler figures (I think MS Office 
accepts it happily) and journals should be happy to take it (?)

- when you open the PNG/pdf/postscript device for writing an image, it 
helps to already know what size/resolution the image needs to be because 
resizing will almost certainly alter the look of text. I tend to save 
data frames for making particular figures instead of saving images for 
this reason.

- I haven't had trouble with this, but the ?postscript help page 
mentions that if you use complex symbols, you need to make sure you have 
good fonts/encodings set for them--see the encodings section on 
?postscript...

- The R wiki has some good information on preparing images.

Hope that helps,

Krzysztof



Mark A. Albins wrote:
> R-sig-eco list,
>
> This is a bit of a tangent from the current conversation, but can 
> someone elaborate on
> this quote from the following message,
>
> "Plots in R come out so nicely, publication quality if you specify 
> them correctly."
>
> In particular, I'd like to hear from the list, how folks specify and 
> export presentation
> quality and publication quality graphics with R.  I've had problems 
> when exporting
> graphics using the copy-to-clipboard option (both bitmap and metafile) 
> and also when
> saving them as jpgs.  They almost always seem to look a little funny 
> (e.g. pixelation,
> symbols coming out distorted etc.).  The only option that I've had 
> much success with is
> saving them as pdf's, but that format is less than ideal when trying 
> to incorporate a
> graphic into another document (e.g. Word or Powerpoint), and is often 
> not the format
> requested by journals.
>
> Any advice would be appreciated.
>
> Thanks,
>
> Mark
>
> __________________________________________________
>
> Message: 1
> Date: Thu, 29 May 2008 20:21:54 -0400
> From: Jessi Brown <jlbrown at unr.edu>
> Subject: [R-sig-eco] AIC, R-Mark, and nest survival
> To: r-sig-ecology at r-project.org
> Message-ID: <483F48A2.9040906 at unr.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi, Dave. Thanks for pointing out the merits of R-Mark as far as
> generating AIC tables reflecting the results of nest survival and other
> data model types.
>
> I do indeed use R-Mark for CJS and multistate population modeling, but I
> prefer the logistic exposure/"Shaffer" nest modeling paradigm for a
> number of reasons. When you have something of a background in linear
> models, the GLM approach is perhaps a little more intuitive than Program
> MARK (but R-Mark circumvents some of that), and data preparation and
> covariate handling seems to go more quickly and easily. Plots in R come
> out so nicely, publication quality if you specify them correctly. Also,
> there's capacity for extending the logistic-exposure models to mixed
> models (which might not be a wise decision, based on violation of the
> assumption that the mean of the error distribution is equal to zero, but
> I digress).
>
> I've done nest survival with both Program MARK (not R-Mark) and GLMs in
> R, and it seems to me (not a biostatistician, but an ecologist who
> dabbles with statistical tools), that it's ok to just go with whatever
> suits your particular style. In my case, since I tend to start with (and
> retain) fairly focused, restricted model suites, it doesn't bother me
> much to hand construct AIC tables with the "n-effective" calculated AIC
> values after having run the GLMs.
>
> BTW, if anyone needs a script of how to set up the logistic-exposure
> link function, it's among the examples in help(family).
>
> cheers, Jessi Brown
>



More information about the R-sig-ecology mailing list