Re: [R] Labeling points with xYplot

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Mon, 10 Nov 2008 13:49:49 -0600

John Poulsen wrote:
> Hello R-Users,
>
> I am trying to label points on an xYplot. I can label the points, but
> then I lose the error bars. I suspect that I should be using
> panel.xYplot rather than panel.xyplot, but that didn't work either...
>
> Can anybody help me out? Example code is below. First xYplot has error
> bars, second tries to label the points and the bars disappear.
>
> Thanks,
> John
>
>
> a=c(1:4)
> b=rnorm(4,15,5)
> blab=b+1
>
> xYplot(Cbind(b, b-1.5, b+1.5)~a,
> ylim=c(0,max(b)+3))
>
> xYplot(Cbind(b, b-1.5, b+1.5)~a, ylim=c(0,max(b)+3),
> panel=function(x,y,...){
> panel.xyplot(x,y,...)
> ltext(x=list(1,2,3,4),
> y=list(13,14,15,16),
> labels=list("A","B","C","D"), pos=2)})

One of the purposes of xYplot is to use panel.xYplot Frank

-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
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.
Received on Mon 10 Nov 2008 - 20:22:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 10 Nov 2008 - 20:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive