Thanks a lot for your help, the examples worked fine, just have to change the colours to produce a b&w plot, and add the legend
On 05/02/2010 17:11, RICHARD M. HEIBERGER wrote:
Fran,

The trick is to use box.width, not box.ratio.

xyplot(Perc ~ as.POSIXct(hora,format="%d-%m-%Y %H:%M"),
        data=digrate, groups=Drate, ## key=leg,
        xlab="time of the day",
        horizontal=FALSE,
         scales=list(alternating=FALSE,
           tck=c(1,0),
           x=list(at=seq(r[1],r[2],by="hour"),
         labels=format(seq(r[1],r[2],"hours"), format="%H"))),
        panel=function(...) {
          panel.fill(col="white")
          panel.grid(-1,0,lty=3,col="gray")
          panel.barchart(...)
        },
       main="xyplot", box.width=5000
       )

I also changed the color of the grid to gray.  I don't want the background grid
visually dominant.

Rich



______________________________________________
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