[Rd] segments(*, col = c(..,NA,..)) {was "color NA ..."}

Ross Ihaka ihaka@stat.auckland.ac.nz
Thu, 12 Jul 2001 09:06:14 +1200


Paul Murrell wrote:

> p.s.  we run into a bit of trouble with this issue for rect() and polygon().
> Both use col=NA to indicate that the rect/polygon should not be FILLED, but
> will still draw a border.  And its not so easy to just change the meaning of
> col=NA -- we need to find a new way of specifying "don't fill, but do draw
> the border".  One option would be col=NULL (?)

I'd like to reserve par=NULL to mean "use the current default value for
par".
This would make it possible to avoid ugliness like:
	bg = par("bg")
It would also make it possible to have sensible meanings for
	my.pars = list(...)
	polygon(x, y, col = my.pars$col)
If there was no "col" in the ... we get a sensible efect.

> p.p.s.  rect(border=NA) doesn't draw a border, but will still fill the
> rectangle.
> 
> p.p.s. polygon(border=NA) DOES draw a border in border=par(fg) -- you have
> to use polygon(border=0) NOT to draw a border.

I think the first of these is right and the second is a bug.
IMHO we do need a way of specifying different border and fill colours.
	Ross

-- 
Ross Ihaka                         Email:  ihaka@stat.auckland.ac.nz
Department of Statistics           Phone:  (64-9) 373-7599 x 5054
University of Auckland             Fax:    (64-9) 373-7018
Private Bag 92019, Auckland
New Zealand
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._