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? Richard -- Dr. Richard Nixon, MRC Biostatistics Unit, Cambridge, UK http://www.mrc-bsu.cam.ac.uk/personal/richard
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? > > Richard >Please read ?points and it's paragraph on te argument "pch" with quite some information regarding filled symbols... Uwe Ligges
Richard Nixon <richard.nixon at mrc-bsu.cam.ac.uk> writes:> 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?Sort of. The quick answer is: example(points). I think you'll get the point. -- O__ ---- Peter Dalgaard ??ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
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