[BioC] multiple pairs plot in a single window
Natasha Sahgal
nsahgal at well.ox.ac.uk
Mon Mar 18 12:59:13 CET 2013
Dear List,
I have 4 datasets and am interested in generating a pairs plot for each.
However, I'm interested in all the 4 pairs plots to be in a single window.
I tried mfrow but that didn't work, then I tried split.screen (code below) but that doesn't work either.
# Window With 2 Rows, Top & Bottom Row In 2 Columns
#jpeg("multScatter.jpg",height=1000,width=1000)
split.screen(c(2,1)) # Makes Screen 1 and 2
split.screen(c(1,2), screen=1) # Makes Screen 3 and 4
split.screen(c(1,2), screen=2) # Makes Screen 5 and 6
# Pairs plots on Screens 3, 4, 5 & 6
screen(3)
pairs(a, upper.panel=panel.cor, labels=group, main="Data 1")
screen(4)
pairs(b,upper.panel=panel.cor,labels=group,main="Data 2")
screen(5)
pairs(c, upper.panel=panel.cor,labels=group,main="Data 3")
screen(6)
pairs(d, upper.panel=panel.cor, labels=group, main="Data 4")
#dev.off()
###############
# Window With 1 Rows and 4 columns
#jpeg("multScatter.jpg",height=1000,width=1000)
split.screen(c(1,4)) # Makes Screen 1 to 4
screen(1)
pairs(a, upper.panel=panel.cor, labels=group, main="Data 1")
screen(2)
pairs(b,upper.panel=panel.cor,labels=group,main="Data 2")
screen(3)
pairs(c, upper.panel=panel.cor,labels=group,main="Data 3")
screen(4)
pairs(d, upper.panel=panel.cor, labels=group, main="Data 4")
#dev.off()
Any help or alternatives would be highly appreacited!
ManyThanks,
Natasha
More information about the Bioconductor
mailing list