[R] Plotting with Statistics::R, Perl/R

Tim Churches tchur at optushome.com.au
Sat Jan 22 23:29:02 CET 2005


Peter Dalgaard wrote:

>d) Use bitmap(). It requires a working Ghostscript install, but is
>otherwise much more convenient. Newer versions of Ghostscript have
>some quite decent antialiasing built into some of the png devices.
>Currently you need a small hack to pass the extra options to
>Ghostscript -- we should probably add a gsOptions argument in due
>course. This works for me on FC3 (Ghostscript 7.07):
>
>mybitmap(file="foo.png", type="png16m", gsOptions=" -dTextAlphaBits=4
>-dGraphicsAlphaBits=4 ")
>
>where mybitmap() is a modified bitmap() that just sticks the options
>into the command line. There are definitely better ways...
>
>[The antialiasing is not quite perfect. In particular, the axes stand
>out from the box around plots, presumably because an additive model is
>used (so that if you draw a line on top of itself, the result becomes
>darker). Also, text gets a little muddy at the default 9pt @ 72dpi, so
>you probably want to increase the pointsize or the resolution.]
>  
>
Apart from the significant quality issues which you mention, the other 
problem with using bitmap() in a Web server environment is the speed 
issue - it takes much longer to produce the output. Whether it takes too 
long depends on the users of your Web application, and how many 
simultaneous users there are. However, most users are more worried by 
the poor quality of the fonts in output produced by bitmap().

Tim C




More information about the R-help mailing list