Re: [R] Annoying bug in package cairoDevice

From: Michael Lawrence <mflawren_at_fhcrc.org>
Date: Tue, 29 Apr 2008 14:30:14 -0700

Sorry about this. cairoDevice 2.8 (just uploaded to CRAN) should fix this problem.

On Tue, Apr 29, 2008 at 1:08 PM, Josh Gilbert <jgilbert.r_at_gmail.com> wrote:

> I sent this to R-Help and the listed maintainer of cairoDevice, I hope
> that was the right thing to do.
>
> For some reason, Cairo_png puts a box around a figure when you call
> plot.new. It looks like box was called with black and a transparent
> background. Example:
> > library(cairoDevice)
> > Cairo_png('cairo.png')
> > plot.new()
> > dev.off()
> null device
> 1
>
> The boarder is narrow, so it's hard to see with a stand-alone image
> viewer. If you paste the png onto a white background it's quite clear.
>
> Admittedly, the default for par("bg") is transparent, par("bty") is "o"
> and par("col") is black. However, this behavior is not consistent with other
> devices (such as png in grDevices even if I set par(bg="white")). Also,
> Cairo_png draws the box even when par(bty="n").
>
> I just tested this on Debian with version 2.6 of cairoDevice. I've also
> observed this behavior on Windows and it's not a new problem.
>
> The only workaround I've found is to call
> > Cairo_png()
> > par(col="white")
> > setHook("plot.new", function() par(col="black"))
> > plot(...)
>
> As far as I'm concerned, this is a serious bug, it's a real problem when
> creating figures for publication. I'd like confirmation that this is, in
> fact, a bug as I haven't seen much documentation for standards for devices.
> I suspect that it's a shallow bug, but I've never seen the code for plot.new
> nor do_Cairo so my suspicion may be more hope than insight.
>
>
> Josh Gilbert
>
> Statistical Researcher
> Broad Institute
> Chemical Biology Program
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org 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 Tue 29 Apr 2008 - 21:36:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Apr 2008 - 22:30:37 GMT.

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

list of date sections of archive