[R] which one give clear picture-pdf, jpg or tiff?

Stuart Luppescu slu at ccsr.uchicago.edu
Fri Aug 20 16:30:18 CEST 2010


On Fri, 2010-08-20 at 01:30 -0700, Joshua Wiley wrote:
> I usually save them
> from R as a PDF or postscript file, rasterize them in GIMP (free
> answer to Photoshop) at the desired resolution, and finally choose the
> desired format/compression (jpeg, png, bitmap, tiff, etc.) to save it
> as from there.  

Woah. That's really involved. I use this little shell function to
convert from ps to png:

function ps2png {
  ps_file="$1"
  png_file=`echo "$ps_file" | sed -e 's/\.ps$/.png/'`
  gs -dQUIET -dNOPAUSE -dBATCH -sDEVICE=png16m -sOutputFile="$png_file" -r200x200 "$ps_file"
}

-- 
Stuart Luppescu -=- slu .at. ccsr.uchicago.edu        
University of Chicago -=- CCSR 
才文と智奈美の父 -=-    Kernel 2.6.33-gentoo-r2                
  Andrew Thomas:
 ...and if something goes wrong here it is probably
 not WinBUGS since that has been running for more
 than 10 years... Peter Green (from the back): ... 
 and it still hasn't converged!    -- Andrew Thomas
 and Peter Green (during the talk about 'BRugs')   
 gR 2003, Aalborg (September 2003)  >  
 
 


More information about the R-help mailing list