ggplot 图例在图例上显示错误的形状

时间:2021-06-28 23:25:02

标签: r ggplot2

我正在尝试为我的 2 个点 A 和 B 设置自定义标签和形状。标签分别正确设置为 A 和 B。为什么形状显示不正确?它应该分别是形状 2 和 3。相反,它是两个点的 2 和 3 的组合。

library(ggplot2) 
ggplot(data.frame(), aes()) +
  geom_point(aes(x = 3, y = 0, col='A'), shape=2) +
  geom_point(aes(x = 5, y = 0, col='B'), shape=3) 

enter image description here

0 个答案:

没有答案
相关问题