display data ( text) on leveplot / Superpose panel
On Thu, May 7, 2009 at 10:13 PM, kulwinder banipal <kbanipal at hotmail.com> 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,...)
Why panel.superpose? Instead, try
panel.levelplot(x,y,z,...)
? ? ? ? ?ltext(x,y,paste(z), adj=c(0,2), cex=.8, col='black')} )
-Deepayan
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 ThanksKulwinder Banipal
_________________________________________________________________ Hotmail? goes with you. ial_Mobile1_052009 ? ? ? ?[[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.