Hi, all,
I'm trying to modify the code to a log scale for y-axis from the post
http://tolstoy.newcastle.edu.au/R/help/06/06/28612.html

However, the error bar did not change accordingly.  The following is the code I used based on the singer.ucl data.

Thanks in advance!

prepanel.ci <- function(x, y, ly, uy, subscripts, ...)
{
    y <- as.numeric(y)
    ly <- as.numeric(ly[subscripts])
    uy <- as.numeric(uy[subscripts])
    list(ylim = range(y, uy, ly, finite = TRUE),y=list(log=10))
}

panel.ci <- function(x, y, ly, uy, subscripts, pch = 16, col.line = 'black', ...)
{
x <- as.numeric(x)
y <- as.numeric(y)
ly <- as.numeric(ly[subscripts])
uy <- as.numeric(uy[subscripts])
 list(ylim = range(y, uy, ly, finite = TRUE),y=list(log=10))

panel.arrows(x, ly, x, uy, col = col.line,
                 length = 0.25, unit = "native",
                 angle = 90, code = 3,log="y")
panel.xyplot(x, y, pch = pch, col.line = col.line, log="y",...) }


xyplot(median ~ voice,
        groups=range,
        data=singer.ucl,
        ly = singer.ucl$lower,
        uy = singer.ucl$upper,
        prepanel = prepanel.ci,
        panel = panel.superpose,
        panel.groups = panel.ci,
        type="b",
        scales=list(y=list(log=10)))

Best regards,
Shelley

	[[alternative HTML version deleted]]

