[英]Insert text in geom_bar
我正在尝试使用ggplot2在R创建一个ggplot2 。 我想将文本D=3放在位于x轴中间且y = 0.55的图形中,但我不知道如何。 我一直在寻找解决方案,但没有发现任何东西。
ggplot2
R
D=3
感谢帮助
我刚刚在博客中找到了答案。 我只需要使用此代码geom_text(data = NULL, x = 3.5, y = 0.55, label = "D=3", size=10) ,就得到了下一个图形。 希望对您中的任何人都有用。
geom_text(data = NULL, x = 3.5, y = 0.55, label = "D=3", size=10)
[英]An issue with geom_text position with geom_bar
[英]ggplot2: geom_text label on ordered geom_bar
[英]Geom_Text not positioning vjust label over Geom_Bar
[英]Absolute position of geom_text in a geom_bar (ggplot2)
[英]geom_text not labelling dodged geom_bar
[英]ggplot: geom_text over geom_bar
[英]adding geom_text from different dataset to geom_bar
[英]Geom_bar compared with geom_text with two discrete variables
[英]colour of geom_bar
[英]Overlapping text on top of geom_bar in ggplot2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.