我有以下情节:

kleinebox<-ggplot(iris, aes(x=Petal.Length, y=Sepal.Length))+
  geom_point(aes(fill=Species), colour="black", pch=21, size=4)+
  scale_fill_manual(values = c("#D89000","#35A2FF","#FA62DB"), 
  breaks = c("#D89000","#35A2FF","#FA62DB"), 
  labels = c("setosa", "versicolor", "virginica")) +
  theme(plot.title = element_text(hjust = 0.2, size=20), legend.position = "right")

不幸的是,没有传说出现 . 这是因为我在 geom_point() 中使用了 aes(fill=..) . 因为如果我使用 geom_point(aes(colour=Species), pch=21, size=4) 就有一个传说 . 但我需要更改我的点的(填充)颜色,因为我使用pch = 21,这是一个彩色点,但边缘是黑色的 . 我需要这个对比 .