Dear friends - using windows xp and R1.6.1 when doing x <- 12 as.character(x) [1] "12" plot(1,2,pch=as.character(x)) the interesting point is marked with: 1 whereas I would like to see 12. In par() is specified under pch: Either an integer specifying a symbol or a single character to be used as the default in plotting points How is that overridden ? Best wishes Troels -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20021130/f335c522/attachment.html
Troels Ring wrote:> > Dear friends - using windows xp and R1.6.1 > when doing > x <- 12 > as.character(x) > [1] "12" > plot(1,2,pch=as.character(x)) > the interesting point is marked with: 1 whereas I would like to see > 12. > In par() is specified under pch: > > Either an integer specifying a symbol or a single character to be > used as the default in plotting points > > How is that overridden ?You cannot. Instead, use text() to plot strings as in plot(..., type="n") text(..., as.character(x)) Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
You want to mark a point with a character string `12'? Use plot(type="n") followed by text. On Sat, 30 Nov 2002, Troels Ring wrote:> Dear friends - using windows xp and R1.6.1 > when doing > x <- 12 > as.character(x) > [1] "12" > plot(1,2,pch=as.character(x)) > the interesting point is marked with: 1 whereas I would like to see 12. > In par() is specified under pch: > Either an integer specifying a symbol or a single character to be used as > the default in plotting points > How is that overridden ? > > Best wishes > Troels >-- 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._