From tom.gottfried at wzw.tum.de  Sat Oct 17 20:15:15 2009
From: tom.gottfried at wzw.tum.de (tom.gottfried at wzw.tum.de)
Date: Sat, 17 Oct 2009 20:15:15 +0200 (CEST)
Subject: [Rd] Grid Graphics Documentation: color specification with gpar()
	(PR#14013)
Message-ID: <20091017181516.000D8282EF4D@mail.pubhealth.ku.dk>

Full_Name: Tom Gottfried
Version: 2.9.2
OS: Mac OS X 10.4.11
Submission from: (NULL) (93.104.160.207)


Dear R-Developers,

on the help page for gpar() is the following paragraph:

"Specifying the value NULL for a parameter is the same as not specifying any
value for that parameter, except for col and fill, where NULL indicates not to
draw a border or not to fill an area (respectively)."

The mentioned exception for col and fill does not hold. Actually what is said in
the section "Color Specification" on the help page for par() is true also for
gpar(): "transparent" and NA specify transparency respectively no drawing.

To verify this:
grid.newpage()
grid.rect(width=.5, height=.5)
grid.rect(width=.25, height=.25, gp=gpar(col=NULL)) # draws the box despite
col=NULL
grid.rect(width=.125, height=.125, gp=gpar(col=NA, fill=2)) # does not draw the
box

regards,
Tom



[Rd] Grid Graphics Documentation: color specification with gpar() (PR#14013)
tom.gottfried at wzw.tum.de