I am trying to make a barplot in R using ggplot2 .I want to put the text D=3 in the graph located in the middle of x axis and in y=0.55, but I don´t know how.I've been looking for a solution but I have not found anything.
Thanks for help
1 answers
solution1
2 2019-07-27 04:51:12
I just found the answer in a blog.I just needed to use this code geom_text(data = NULL, x = 3.5, y = 0.55, label = "D=3", size=10) and I got next graph.I hope it can be useful for any of you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.