[R] quick "points" question

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Sep 27 18:02:32 CEST 2005


On Tue, 27 Sep 2005, Richard Nixon wrote:

> Hi
> Just one of those niggles.......
>
> I've just been trying to plot a filled circle.
> I thought that this would do it
>
> plot(1,1,type="n")
> points(1,1,pch=1,bg="blue",cex=5)
> #bg: background ("fill") color for open plot symbols
>
> But I need to do this instead
> points(1.2,1,pch=19,col="blue",cex=5)
>
> Am I misunderstanding the "bg" option in the points function?

Yes. See the examples.   pch=1 is not an `open plot symbol': 21-25 are.
So in your case

points(1.3, 1, pch=21, col="blue", bg="red", cex=5)

may be illuminating.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list