[英]In ggplot, why my labels are not palced in the right position?
this is my dataframe:这是我的 dataframe:
mydf <- structure(list(NOME = c(1, 1, 1, 1, 1), PLAYER.POSITION = c("Lateral",
"Lateral", "Lateral", "Lateral", "Lateral"), variables_bar = structure(5:1, .Label = c("ACCELERATIONS.Z6",
"ACCELERATIONS.Z5", "ACCELERATIONS.Z4", "ACCELERATIONS.Z3", "ACCELERATIONS"
), class = "factor"), value = c(185L, 111L, 49L, 22L, 3L)), row.names = c(NA,
-5L), class = c("tbl_df", "tbl", "data.frame"))
This is my plot:这是我的 plot:
mydf %>% ggplot() + geom_col(aes(x = NOME, y = value, fill = variables_bar)) + geom_label(aes(x = NOME, y = value,label = value))
The labels should be on the top of each bar, but its not.标签应该在每个栏的顶部,但不是。
Any help?有什么帮助吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.