Hi,
I am looking for a way to add labels, i.e. absolute values, into a
stacked bar chart using the basic plot functions of R. The labels should
be inside the stacked bars.
For example,
### I have this dataset
height = cbind(x = c(465, 91) / 465 * 100,
y = c(840, 200) / 840 * 100,
z = c(37, 17) / 37 * 100)
### and use this plot
barplot(height,
beside = FALSE,
horiz=T,
col = c(2, 3)
)
how can I put the values from height within the respective stacked bars?
Thank you!
--
+++++++++++++++++++++++++++++++++++++++++
Dipl.Biol. Jens Oldeland
Biodiversity of Plants
Biocentre Klein Flottbek and Botanical Garden
University of Hamburg
Ohnhorststr. 18
22609 Hamburg,
Germany
Tel: 0049-(0)40-42816-407
Fax: 0049-(0)40-42816-543
Mail: oldel...@botanik.uni-hamburg.de
oldel...@gmx.de (for attachments > 2mb!!)
Skype: jens.oldeland
http://www.biologie.uni-hamburg.de/bzf/fbda005/fbda005.htm
http://jensoldeland.wordpress.com
+++++++++++++++++++++++++++++++++++++++++
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.