【发布时间】:2023-01-26 01:23:33
【问题描述】:
我已经在我的一些代码中使用了 scale_fill_identity 函数。现在 - 突然之间 - 使用它时 - 它不会填充任何东西。
这里有一个例子:
# Create example data
data <- data.frame(x = c(1, 2, 3), y = c(4, 5, 6), fill = c("red", "blue", "yellow"))
# Create the plot
ggplot(data) +
geom_point(aes(x = x, y = y, fill = fill)) +
scale_fill_identity()
这给了我这个:
所以没有颜色。问题可能出在哪里的任何建议?
【问题讨论】: