[R] Dynamically changing point's symbol in grid.points...

Paul Murrell p.murrell at auckland.ac.nz
Tue Mar 4 03:52:03 CET 2003


Hi


M.Kondrin wrote:
> ...does not work. Do 
> k<-grid.points(c(0.1,0.2,0.3),c(0.1,0.2,0.3),pch=3,vp=viewport()) 
> (symbol - +). Try to change it grid.edit(k, pch=1) (symbol - open 
> circle). Get filled squares. pch from 0 to 25 produces the same output. 
> pch="x" - works OK. Device - x11(), gtk() (from GtkDevice). R -1.6.1


The problem is that the pch gets interpreted as an integer.

I think the right fix for this is for grid to do the coercion in C code; 
  I'll try to put this in the next grid release.

In the meantime, a workaround is to do something like ...

     grid.edit(k, pch=as.integer(1))

Paul
-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz




More information about the R-help mailing list