Re: [R] graphic output file format

From: Jeffrey Horner <jeff.horner_at_vanderbilt.edu>
Date: Sat 12 Aug 2006 - 01:10:21 EST

Luiz Rodrigo Tozzi wrote:

> Hi
> 
> I had some problems using GDD, especially with colors and with some advanced
> plottings.
> 
> In my case I didnt try the Cairo, I just got back to the png() using Xvfb
> (its almost 3 or 4 times slower than my first tries qith GDD, but using GDD
> would cause me to rewirte some parts of my script)
> 
> Since my Xvfb "came back to normal" in cron mode, I didnt use the Cairo, but
> mr urbanek really suggested it to me.

I've had a little experience with both GDD and Cairo:

GDD has served my needs well when drawing thin lines and pixels, although, the current implementation has problems with the background color and the line width (lwd) not being honored. I've hacked around a bit, and I can now set the background correctly, but I need to clean up the patch to submit to Simon. Also, libgdd rasterizes pngs very well. If you're interested in examples, check out the png images here:

http://biostat.mc.vanderbilt.edu/DiffGraphics

For the same needs, Cairo does very poorly rasterizing for fine pixel detail; it's not so much libcairo's fault as much as the package Cairo not being able to handle this, if it can at all. A better explanation of this issue is here: http://cairographics.org/FAQ. Read the first question: "Why does my 1-pixel wide horizontal/vertical line come out fat and blurry (eg. 2 pixels wide and half-intensity)?"

I'm not sure why you're having trouble with colors in GDD; I've never run into this issue.

> I dont know if you have something similar to Xvfb in Mac OSX
> 
> Tozzi
> 
> 2006/8/10, erick@nospammail.net <erick@nospammail.net>:

>>
>> I received the following communication from the package maintainer
>> for GDD (Simon Urbanek) when I was having compile problems on linux...
>>
>>>> gd.x86_64 2.0.28-4.4E.1
>>>> installed Matched from:
>>> ^^
>>> +--- your GD is too old. You'll need at least gd-2.0.29 (see README
>>> in GDD) and 2.0.33 is recommended.
>>> You may want to try Cairo (see the nightly page) instead of GDD,
>>> because cairographics has some features that GD is lacking and it is
>>> actively maintained (unfortunately libgd is pretty much dead).
>>>
>>> Cheers,
>>> Simon
>> Disclaimer: I actually cannot get the Cairo to work either!
>> Eric
>>
>>
>>
>> On Thu, 10 Aug 2006 19:00:08 +0200, "Stefan Grosse"
>> <stefan.grosse@uni-erfurt.de> said:
>>> Please mail always also to the list, since it may be that there is
>>> someone who could reply better and/or faster.
>> [Case in point.]
>>> Especially in this case since I am only experienced in M$ Windows and
>>> Linux so I am unable to guess whats wrong with OSX. does not even the
>>> postscript device work? With postscript I get the best quality for
>>> printing.
>>>
>>> e.g.:
>>> postscript("test.eps", width = 8.0, height = 6.0, horizontal = FALSE,
>>> onefile =FALSE, paper = "special")
>>> curve(x^2)
>>> dev.off()
>>>
>>>
>>> Conan Phelan schrieb:
>>>> Thanks for the feedback and link Stefan,
>>>>
>>>> Perhaps if I provide a little more background. (Pls
>>>> forgive both my ignorance and my long windedness.)
>>>>
>>>> I am on Mac OSX and am only able to load the Quartz
>>>> graphic device (is that normal?). From quartz, I've
>>>> only been able to generate pdf files, which do not
>>>> match the quartz display to my satisfaction. I've been
>>>> attempting to find a way to generate other output
>>>> files for comparison. (I've managed to generate a bmp
>>>> file that looked awful, after acquiring Gostscript).
>>>>
>>>> Anyway, I figure R must able to produce high quality
>>>> graphic outputs, so I'm trying different things. To
>>>> this end I was hoping that the GDD package would allow
>>>> me to load the x11 module but it seems to be a no-go
>>>> (is there some system requirement I'm missing?).
>>>>
>>>> Conan
-- 
Jeffrey Horner       Computer Systems Analyst         School of Medicine
615-322-8606         Department of Biostatistics   Vanderbilt University

______________________________________________
R-help@stat.math.ethz.ch 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.
Received on Sat Aug 12 01:14:41 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 12 Aug 2006 - 02:20:41 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.