by considering this example from barley dataset

#code start

dotplot(variety ~ yield | site, data = barley,
        scales=list(x=list(log=TRUE)),
        layout = c(1,6),
        panel = function(...) {
        panel.dotplot(...)
        #median.values <- tapply(x, y, median)            # medians for each
variety
        #panel.abline(v=median.values, col.line="red")    # but this is not
working!
        #panel.curve(...)                                 # how to properly
set this?
        }
        )

#code end

I want to plot as a reference vertical line the medians for each panel

I’ve been reading in 
https://stat.ethz.ch/pipermail/r-help/2009-January/185384.html 
that it’s not possible with panel.abline() and it’s probably necessary to
use panel.curve() instead; unfortunately I can’t figure (manage) how, any
help for this?

thank you




--
View this message in context: 
http://r.789695.n4.nabble.com/how-to-add-a-vertical-line-for-each-panel-in-a-lattice-dotplot-with-log-scale-tp4632513.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to