Re: [R] grid and ps device (bg-color)

From: Paul Murrell <p.murrell_at_auckland.ac.nz>
Date: Sat 30 Apr 2005 - 08:20:15 EST

Hi

mkondrin wrote:
> Hello!
> Is it a bug or something?
> When I try to draw a grid-graphics on ps output background color is
> always transparent (with standard plot(...) this is not the case - the
> background is filled with ps.options()$bg color). What's wrong? Drawing
> a background grid.rect does not help - there is always small transparent
> margains along picture frame. Can this be fixed (I use R-2.0.1)?

Yes, it's a bug. Grid does not take appropriate notice of some important initial device settings. A fix is on my todo list. In the meantime, is the following workaround adequate (draw a filled rectangle much larger than the device)?

grid.rect(width=2, height=2,

           gp=gpar(fill=ps.options()$bg.color))

Paul

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul@stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
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
Received on Sat Apr 30 08:25:44 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:31 EST