Re: [R] Plotting points on line graphs using xYplot in Hmisc

From: John Poulsen <>
Date: Fri, 09 May 2008 13:40:49 -0400 (EDT)

Hello Deepayan,

Please ignore my last e-mail and question. The information was easily found in ?panel.segments.


On 5/5/08, John Poulsen <> wrote:
> >
> >
> > Hello,
> >
> > I am using xYplot to plot lines with confidence bands (see
> test example
> > below). I would like to add a single point with confidence
> bars to each
> > graph (coordinates of the points below: px, py, pxlow, etc...).
> I tried
> > playing with panel=panel.superpose, but failed to get it to
> work. Any ideas
> > on how to add these points to the graphs?

If you want to add the same lines/points in all panels, you could write a not-too-complicated custom panel function; e.g.,


     xYplot(Cbind(ycomb, y.up, y.low)~x1|factor(grp),
            method="filled bands",
            col.fill="light grey",
            subscripts = TRUE,
            panel = function(...) {
                panel.segments(pxlow, pylow, pxhi, pyhi)


John Poulsen
223 Bartram Hall PO Box 118525
University of Florida
Gainesville, FL 32611-8525 mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 09 May 2008 - 18:46:11 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 Fri 09 May 2008 - 19:30:36 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive