小编Jos*_*man的帖子

fun.y 和 stat_summary 停止在 ggplot 中工作

我过去常常运行这段代码来获取条形图顶部“n”的总和。

现在我收到以下错误:

忽略未知参数:fun.y

没有提供汇总函数,默认为mean_se()

count %>%
ggplot(aes(x = date, y = n, group = class, fill = class)) +
  geom_col() +
  geom_text_repel(
    aes(label = stat(y), group = date), 
    stat = 'summary', fun.y = sum, vjust = -1
  ) 
Run Code Online (Sandbox Code Playgroud)

ggplot 不再对数据进行“求和”并忽略 vjust

r ggplot2

3
推荐指数
1
解决办法
6909
查看次数

标签 统计

ggplot2 ×1

r ×1