...and what if I need to plot another vertical line for showing also the
means for each panel?
by simply adding another call to panel.abline () seems not producing a
correct result for each panel

# medians and means for each panel:
dotplot(variety ~ yield | site, data = barley,
       scales=list(x=list(log=TRUE)),
       layout = c(1,6),
       panel = function(x,y,...) {
       panel.dotplot(x,y,...)
       median.values <- median(x)
       panel.abline(v=median.values, col.line="red")
       mean.values <- mean(x)
       panel.abline(v=mean.values, col.line="red")
})

In the dataset I'm currently working on (which is not the above mentioned
example) I've got a wrong plottting of the means for each panel, what I'm
missing?

thanks
 



--
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-tp4632513p4632678.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