在 R 中使用 ggplot2 时出现 setup_panel_guides 错误

问题描述 投票:0回答:1

我使用 ggplot 收到此错误。我也尝试过更新 R。 谢谢!

> library(ggplot2)
> packageVersion("ggplot2")
[1] ‘3.5.1’
> ggplot(aes(mpg,cyl),data=mtcars)+geom_point()
Error in setup_panel_guides(..., self = self) : 
  unused argument (list(~mpg, ~cyl))
r ggplot2
1个回答
0
投票

这应该有效:

library(ggplot2)

packageVersion("ggplot2")


ggplot(data = mtcars, aes(x = mpg, y = cyl)) + geom_point()

这给出了

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.