[R] text(x,y,greek character)
Roy Little
rlittle at ula.ve
Mon Oct 10 13:59:14 CEST 2005
Dear list,
I would like to plot points with two types of labels, one at the data
point (the name of the point) and another offset a bit with another
factor which is either of the two greek characters alpha or beta. I have
tried to get the routine to plot a greek character with expression() or
with substitute() and have not yet had any success. The following only
plots the word in english in plain text. Here is my subroutine and data:
---------------------------------------------------
vmat<-as.matrix(read.table("vmat"))
Xm<-vmat[1:22,1:20]
hemd<-read.table("threehem",header=T)
Ym<-as.matrix(hemd[,2])
gvdw.pls<-plsr(Ym ~ Xm,6,method="kernelpls")
rsltv<-predict(gvdw.pls,comps=6)
plot(Ym,rsltv,type="n",xlab="Actividad +
Biológica",xlim=c(4.6,6),ylim=c(4.8,6),ylab=" Act. +
Biol.(Pred.)",main="QSAR Ligación de Derivados de la Artemisina con +
Hemina",sub="Descriptores de Coeficientes VdW")
text(Ym,rsltv,labels=threehem$cpd)
text(Ym,rsltv,labels=hemd$type,adj=c(0,-1))
---------------------------------------------
threehem:
"cpd" "ba" "deox" "ox" "hemin" "type"
"1" 1 4.89 -5.32 -5.11 -5.18 alpha
"2" 2 4.89 -5.12 -4.92 -5.12 beta
"3" 3 5.41 -5.62 -5.41 -5.56 alpha
"4" 4 5.47 -5.34 -5.09 -5.3 beta
"5" 5 5.21 -5.41 -5.12 -5.36 beta
"6" 6 5.28 -5.44 -5.14 -5.39 beta
"7" 7 5.16 -5.47 -5.17 -5.39 beta
"8" 8 4.8 -5.43 -5.03 -5.41 beta
"9" 9 4.92 -5.17 -4.9 -5.12 beta
"10" 10 5.02 -5.29 -4.94 -5.35 beta
"11" 11 5.18 -5.72 -5.38 -5.68 alpha
"12" 12 5.44 -5.53 -5.39 -5.66 alpha
"13" 13 5.71 -5.93 -5.64 -5.86 alpha
"14" 14 5.74 -6.01 -5.78 -5.91 alpha
"15" 15 5.75 -5.79 -5.61 -5.71 alpha
"16" 16 5.87 -5.97 -5.67 -5.94 alpha
"17" 17 5.37 NA NA -6.49 alpha
"18" 18 5.75 NA NA -6.5 alpha
"19" 19 5.04 -5.26 NA -5.17 beta
"20" 20 4.89 -5.04 -4.75 -4.98 beta
"21" 21 5.81 -5.71 NA -5.87 alpha
"22" 22 5.62 -6.11 NA -6.23 alpha
----------------------------------
I have included the Xm matrix of predictors as an attachment.
Thank you very much for your help.
Roy Little
Dept. Chem.
Facultad de Ciencias
Universidad de los Andes
Mérida, Venezuela
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vmat
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20051010/894900e0/vmat.pl
More information about the R-help
mailing list