[R] equal spacing of the polygons in levelplot key (lattice)

Andy Bunn Andy.Bunn at wwu.edu
Tue Nov 15 22:12:22 CET 2011


Given the example:
R> (levs <- quantile(volcano,c(0,0.1,0.5,0.9,0.99,1)))
   0%  10%  50%  90%  99% 100% 
   94  100  124  170  189  195 
R> levelplot(volcano,at=levs)

How can I make the key categorical with the size of the divisions equally spaced in the key? E.g., five equal size rectangles with labels at levs c(100,124,170,189,195)? 

Apologies if this is obvious. 

-A

R> version
                _                            
 platform       i386-pc-mingw32              
 arch           i386                         
 os             mingw32                      
 system         i386, mingw32                
 status                                      
 major          2                            
 minor          14.0                         
 year           2011                         
 month          10                           
 day            31                           
 svn rev        57496                        
 language       R                            
 version.string R version 2.14.0 (2011-10-31)



More information about the R-help mailing list