David Scott <d.scott <at> auckland.ac.nz> writes:

> 
> 
> I would like to add some vertical lines to a lattice plot of histograms. 
> What I am after is a lattice version of abline(v = 1234). The lattice 
> histogram plot is just:
> 
> histogram( ~ LTSE | approach, data = arrivals)
> 

As a little variation on the histogram docs example:

histogram( ~ height | voice.part, data = singer,
          xlab = "Height (inches)", type = "density",
          panel = function(x, ...) {
              panel.histogram(x, ...)
              panel.abline(v= 70)
              panel.mathdensity(dmath = dnorm, col = "black",
                                args = list(mean=mean(x),sd=sd(x)))
          } )

 
Dieter

______________________________________________
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