[R] shift pie chart

Michael Eisenring michael.eisenring at gmx.ch
Fri Jul 27 12:15:17 CEST 2012


Dear R-help members,
I did the following pie chart:

R:Code=

plants<-c(11,5,4,4,4,3,3,3,3,3,3,2,2,2,2,2,2,43)
pie(plants,labels =plant_labels,cex=0.7, col=colors)
par(mar=c(0,0,4,0),oma=c(0,0,0,0))
legend(1,1,cex=0.7,pt.cex=25, c("Rubiaceae","Aspleniaceae","Compositae","Euphorbiaceae","Piperaceae","Acanthaceae","Dryopteridaceae","Cucurbitaceae","Rosaceae","Rutaceae","Urticaceae","Apocynaceae","Cyperaceae","Gramineae","Labiatae","Leguminosae","Menispermaceae","Rest (50 families)"),fill=colors)

As you can see the legend is not displayed proberly. 

1)How can I move the pie chart as well as the legend together to the left? I tried to work with "mar" and "omar", without any success.
2) How can I increase the legend font size without increasing the size of the "legend points"? I tried to do this with "cex" and "pt.cex2


Thank you very much
all the best
Michi



More information about the R-help mailing list