An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090508/fb414aa9/attachment-0001.pl>
display data ( text) on leveplot / Superpose panel
3 messages · kulwinder banipal, David Winsemius, Deepayan Sarkar
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
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.