Is there a way to tell at what dpi R generates graphics at? I need to generate 600 dpi graphics for an article. -roger _______________________________ UCLA Department of Statistics rpeng at stat.ucla.edu http://www.stat.ucla.edu/~rpeng -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 has no such concept. Most of the devices generate vector graphics, and for png/jpeg you specify a number of pixels. Only (dev2)bitmap has dpi, its `res' argument. On Wed, 7 Aug 2002, Roger Peng wrote:> Is there a way to tell at what dpi R generates graphics at? I need to > generate 600 dpi graphics for an article.-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Roger, On Wed, Aug 07, 2002 at 10:30:59PM -0700, Roger Peng wrote:> Is there a way to tell at what dpi R generates graphics at? I need to > generate 600 dpi graphics for an article.I would generate the graphics in eps then convert it with ghostscript. The attached shell script can give some hints about this. Zoltan -- Zoltan BARTA Z.Barta at bristol.ac.uk http://delfin.klte.hu/~zbarta/ -------------- next part -------------- #! /bin/bash # convert .eps files to .tif files using ghostscript b_nev=$1; for f in "$b_nev"*.eps; do bf=`basename $f .eps`; echo -n Processing: $bf; infile=$bf.eps; outfile=$bf.tif; # this gives the bounding box BB=`gs -dBATCH -dNOPAUSE -sDEVICE=bbox $infile 2>&1 | grep '^..B'`; echo -n ...; # this set the paper size width=`echo "$BB"|awk '{print $4}'`; height=`echo "$BB"|awk '{print $5}'`; echo "width: $width, height: $height"; # this does the transformation gs -dBATCH -dNOPAUSE -dDEVICEWIDTHPOINTS=$width \ -dDEVICEHEIGHTPOINTS=$height -sDEVICE=tiffg4 \ -sOutputFile=$outfile -r600x600 $infile > /dev/null; echo done. done