[R] Labels on a pyramide
    Orvalho Augusto 
    orvaquim at gmail.com
       
    Sat Feb 13 15:27:26 CET 2010
    
    
  
I am using pyramid.plot() from the plotrix package.
I have something like this
############################################
xy.pop<-dados$masfr
xx.pop<-dados$femfr
#agelabels<-dados$femlab
xycol<-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),11)
xxcol<-color.gradient(c(1,1,0.5,1),c(0.5,0.5,0.5,1),c(0.5,0.5,0.5,1),11)
xylab<-dados$maslab
xxlab<-dados$femlab
agelabels<-xylab
png("piramide9808.png")
par(mar=pyramid.plot(xy.pop,xx.pop,labels=agelabels,top.labels=c("Masculino","","Feminino"),
       main="Primeiras 10 cancros mais frequentes por
sexo...",xycol=xycol,xxcol=xxcol,gap=0, labelcex=0))
dev.off()
#################################
the dados a dataframe fabircated by someother program and looks like:
######################
ordem	femlab	femfa	femfr	maslab	masfa	masfr
1	Colo do utero	258	26.76348548	Prostata	613	43.81701215
2	Mama	110	11.41078838	Figado	84	6.004288778
3	Esofago	62	6.43153527	Pele	70	5.003573981
4	Figado	60	6.22406639	Sarcoma de Kaposi	65	4.64617584
5	Pele	48	4.979253112	Esofago	63	4.503216583
6	Bexiga	37	3.838174274	Pulmao	46	3.288062902
7	Corpo do utero	34	3.526970954	Bexiga	43	3.073624017
8	"Utero, SOE"	28	2.904564315	Penis	33	2.358827734
9	Sarcoma de Kaposi	28	2.904564315	Laringe	27	1.929949964
10	Vulva e Vagina	24	2.489626556	Colon	24	1.715511079
11	Outras localizacoes	275	28.52697095	Outras localizacoes	331	23.65975697
#####################################
The problem is (1) I do not want plot agelabels on the center and (2)
I want plot different labels for each pair of the bars (one label for
masculine and the other feminine).
The data represent the 10 most frequent cancer in a group of individuals.
Can some one help please?
Caveman
-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaquim at cenfoss.co.mz
cell: +258828810980
    
    
More information about the R-help
mailing list