How to rotate the label like geom_text(angle=45)

조회수 7,657회
읽지 않은 첫 메시지로 건너뛰기

cqzan

읽지 않음,
2016. 11. 23. 오전 10:13:1416. 11. 23.
받는사람 ggplot2

thanyou .

Xingmin Zhang

읽지 않음,
2016. 11. 23. 오후 1:18:5916. 11. 23.
받는사람 ggplot2
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 .

cqzan

읽지 않음,
2016. 11. 24. 오전 7:03:1216. 11. 24.
받는사람 ggplot2
谢谢,我是想问把图中有背景颜色的也变为45度的怎么弄,p <- ggplot(mtcars, aes(wt, mpg, label = rownames(mtcars)))
p +geom_label(aes(fill=factor(cyl))),然后怎么把他旋转。。

Xingmin Zhang於 2016年11月24日星期四 UTC+8上午2時18分59秒寫道:
전체답장
작성자에게 답글
전달
새 메시지 0개