geom_text
is tha analog of text
from base graphics:
p + geom_bar() + stat_bin(aes(label=..count..), vjust=0,
geom="text", position="identity")
If you want to adjust the y-position of the labels, you can use the y=
aesthetic within stat_bin
: for example, y=..count..+1
will put the label one unit above the bar.
The above also works if you use geom_text
and stat="bin"
inside.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…