[BioC] Situation of the legend in the plotPCA of the affycoretools library

Jordi Altirriba Gutiérrez altirriba at hotmail.com
Fri Sep 29 00:56:32 CEST 2006


Hi James,

First of all many thanks for your answer and the package!

>>I am trying to do a PCA plot with the package affycoretools, which I have 
>>found very useful!
>>I am not able to change the situation of the legend in the plot, although 
>>I have introduced the variables x.coord and y.coord in the script. Could 
>>it be a little bug or am I doing something wrong?
>>
>
>No bug, just a misunderstanding. There are no arguments x.coord or y.coord 
>(actually, I don't think these are arguments for any plotting function that 
>I can think of - where did you get the idea you could pass these as 
>arguments?).

I got this argument from the plotPCA help:

>?plotPCA
....
Usage:

     plotPCA(eset, groups, groupnames, addtext = NULL, x.coord = NULL,
     y.coord = NULL, screeplot = FALSE, squarepca = FALSE)

....

x.coord: Pass an x-coordinate if automatic legend placement fails

y.coord: Pass a y-coordinate if automatic legend placement fails

....

Many thanks in advance,

Jordi Altirriba
PhD student
Hospital Clinic (Barcelona, Spain)


>>This is my code:
>>library(affycoretools)
>>Data<-ReadAffy()
>>eset<-rma(Data)
>>pd <- read.phenoData("pdata2.txt", header = TRUE, row.names = 1)
>>plotPCA(eset,groups = rep(1:2, each = 3), groupnames = 
>>unique(pData(pd))[,1],addtext=sampleNames(Data))
>>
>>I obtain exactly the same plot writing:
>>plotPCA(eset,groups = rep(1:2, each = 3), groupnames = 
>>unique(pData(pd))[,1],addtext=sampleNames(Data),x.coord=0,y.coord=0)
>>
>>My session:
>>
>>>sessionInfo()
>>>
>>Version 2.3.1 (2006-06-01)
>>i386-pc-mingw32
>>
>>attached base packages:
>>[1] "splines"   "tools"     "methods"   "stats"     "graphics"  
>>"grDevices"
>>[7] "utils"     "datasets"  "base"
>>
>>other attached packages:
>>    rat2302cdf affycoretools       GOstats      Category      hgu95av2
>>      "1.12.0"       "1.4.0"       "1.6.0"       "1.4.1"      "1.12.0"
>>          KEGG      multtest    genefilter      survival        xtable
>>      "1.12.0"      "1.10.2"      "1.10.1"        "2.28"       "1.3-2"
>>          RBGL      annotate            GO         graph         Ruuid
>>       "1.8.1"      "1.10.0"      "1.12.0"      "1.10.6"      "1.10.0"
>>         limma          affy        affyio       Biobase
>>      "2.7.10"      "1.10.0"       "1.0.0"      "1.10.1"



More information about the Bioconductor mailing list