Skip to content

grid and ps device (bg-color)

2 messages · mkondrin, Paul Murrell

#
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)?
#
Hi
mkondrin wrote:
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