R graphics: Add labels to stacked bar chart

后端 未结 3 1003
粉色の甜心
粉色の甜心 2020-12-19 19:46

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.

3条回答
  •  情书的邮戳
    2020-12-19 20:28

    How about the simple function text()?

    You can simply add a string where ever you want, eg:

    text (x = ..., y = ..., labels = c("foo bar 1000"))
    

提交回复
热议问题