[R] display data ( text) on leveplot / Superpose panel

David Winsemius dwinsemius at comcast.net
Fri May 8 16:51:57 CEST 2009


I would have expected that Sarkar's response to a similar question  
about dotplot offered yesterday ought to have a good chance of  
answering this question. Search on dotplot:

"labeling coordinates for each point"

-- 
David Winsemius
On May 8, 2009, at 1:13 AM, kulwinder banipal wrote:

>
> I am trying to display data ion top of colored rectangle on the same  
> levelplot. While using superpose the shape and symbol for levelplot  
> changes to small circle. I am unable to figure what exactly I am  
> doing wrong... It may be straightforward solution... .I will  
> appreciate help to fix this issue.
> brewer.div<- 
> colorRampPalette(c("pink","green","blue","yellow","red"),   
> interpolate="linear")levelplot(ds,  shrink=c(0.9,1), aspect=3/5,  
> scales=list(x=list(rot=0)), cuts = 10, col.regions = brewer.div(20),  
> xlab="",
>
>
> ylab="" ,  main="" ,
> panel = function(x,y,z,...) {
>          panel.superpose(x,y,z,...)
>          ltext(x,y,paste(z), adj=c(0,2), cex=.8, col='black')}
> )
>
> where ds is matrix
>  pct20 pct40 pct60 pct80 pct100A    16    18     6     2      0C     
> 19    11     7     0      0D     9    16     2     0      0E    
> 135     9     0     0      0J    90    57     3     1      0M     
> 47    17     1     0      0T    19     9     3     1      0
>

That is not a usable example. Next time use plain text rather than  
HTML mail format.

> ThanksKulwinder Banipal
>
> _________________________________________________________________
> Hotmail® goes with you.
>
> ial_Mobile1_052009
> 	[[alternative HTML version deleted]]

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list