[R] Lattice : Single reference line/label at 0.05

From: Troy S <troysocks-twigs_at_yahoo.com>
Date: Mon, 30 Jun 2008 11:12:08 -0700 (PDT)


r-friends--

I am trying to make a lattice plot with a single label at 0.05. A reference line at y=0.05 as well... This is what I have so far. The label reads 0.0 and there is a grid instead of a single reference line. Can someone help please?

Troy
x<-18:35
(pv<-1/(x-17))
xydf<-data.frame(x, pv)
print(xyplot(pv~x, data=xydf, type=c('p', 'g'),   ylim=c(0,1),
  yscale.components= function(lim, ...) {     ans <- yscale.components.default(lim = lim, ...)

    ans$left$ticks$at <- c(0.05)
    ans$left$ticks$labels$at <- c(0.05)
    ans$left$ticks$labels$labels <- c("0.05")
    ans
    }     

  ))

        [[alternative HTML version deleted]]



R-help_at_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. Received on Mon 30 Jun 2008 - 18:15:59 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 Mon 30 Jun 2008 - 20:33:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive