Do a ?geom_text in your console to read the manual.
It's like this:
df <- data.frame(
x = factor(c(1, 1, 2, 2)),
y = c(1, 3, 2, 1),
grp = c("a", "b", "a", "b")
)
ggplot(df) + geom_point(aes(x=x, y=y)) + geom_text(aes(x=x,y=y,label=grp),hjust=-0.7,vjust=-0.1,angle=45,size=12)
On Wednesday, November 23, 2016 at 9:13:14 AM UTC-6, cqzan wrote:
thanyou .