[R] grid and ps device (bg-color)
Paul Murrell
p.murrell at auckland.ac.nz
Sat Apr 30 00:20:15 CEST 2005
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 at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/
More information about the R-help
mailing list