[BioC] pairs(): different ylim , xlim for upper.panel and lower.panel?

Stefan Thomsen stt26 at cam.ac.uk
Mon Dec 3 20:01:47 CET 2007


Dear all,

I am trying to create pairs plots with two different panel functions 
creating MvA and XY scatterplots, respectively.


In this context I ran into two problems:

1)I did not manage to assign separate xlim, ylim values to both functions.

This is what I tried:

panel.mva = function (x, y, ...) { m <- x - y a <- (x + y)/2 ma.plot(a, m, 
show.statistics = FALSE, span = 2/3, plot.method="add", ylim=c(-4,4)) }

panel.lines <- function(x, y, ...) {
   points(x, y)}


pairs(matr[gvIndex, c(1,28)],  	
           upper.panel= panel.mva, lower.panel=panel.lines, gap=0, 
ylim=c(4,14))

Each panel function for itself works just fine outside pairs(), using 
pairs() I always end up with the same ylim in both upper and lower panel. I 
tried to look at the code for pairs() and ma.plot() but could not figure 
out the reason for this.


2)The ma.plot help page indicates that the plot.method argument has to be 
set to "add" if the MvA plot is to be added to an existing plot like in my 
case; and indeed, setting it to "smoothScatter", leads to an error message 
:

Error in pairs.default(matr[gvIndex, c(1, 28)], panel = panel.mva) : 
  the 'panel' function made a new plot

The MA plot is not positioned properly and 'jumps' to the next matrix 
position.

Is there a possibility to use smoothscatter in conjunction with pairs()? I 
tried to assign add=T to ma.plot() in my panel.mva function which did not 
work.




Any hints or recommendations would be highly appreciated.


Kind regards,

Stefan





-- 
Dr. Stefan Thomsen
Research Associate

Department of Zoology
University of Cambridge
Downing Street
Cambridge CB2 3EJ

Tel.: +44 1223 336623 
Fax:  +44 1223 336679

stt26 at cam.ac.uk



More information about the Bioconductor mailing list