[R] order the plots using lattice

From: audrey <audrey_at_ebi.ac.uk>
Date: Thu, 06 Mar 2008 12:00:42 +0000

Dear all,

I am running something similar to this short example:


X=matrix(cbind(1:100,100:1,c(1:50,50:1)),ncol=3) Y=matrix(cbind(1:100,1:100,1:100),ncol=3) names=1:3

dummy.df = data.frame(names = factor(names, levels = names),   x = seq_along(names),
  y = seq_along(names))

xyplot(y ~ x | names, dummy.df,

      xlim = c(1,100),
      ylim = c(1,100),
       panel = function(x, y, ...) {
         x <- X[,x]
         y <- Y[,y]
         panel.smoothScatter(x, y ,...)
       layout = c(2, 2, 1),
       strip = function(..., bg) strip.default(..., bg ="#cce6ff"))

In the output, the first plot is represented in the bottom left corner, I would like the plots to be drawn from the top left corner but I cannot find in the Lattice help, the argument to set to do that. I have tried to play with the index.cond but depending on my number of plots to draw, it does not always work properly in an automated script. Does anyone knows a trick to start drawing the plots from the top left corner?

Thanks in advance for your help,

PS: sessionInfo()
R version 2.7.0 Under development (unstable) (2008-03-05 r44682) x86_64-unknown-linux-gnu


attached base packages:
[1] tools stats graphics grDevices utils datasets methods
[8] base

other attached packages:
[1] geneplotter_1.17.3 annotate_1.15.0 Biobase_1.17.7 lattice_0.17-6
[5] fortunes_1.3-3

loaded via a namespace (and not attached):
[1] AnnotationDbi_0.0.68 DBI_0.2-3 grid_2.7.0
[4] KernSmooth_2.22-22 RColorBrewer_1.0-1 RSQLite_0.5-4

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 Thu 06 Mar 2008 - 12:03:20 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 Thu 06 Mar 2008 - 20:30:19 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