R - tips

在ggplot中添加额外的点

2018-07-30  本文已影响5人  董八七
df = data.frame(Sepal.Width = 5.6, Sepal.Length = 3.9) 

ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, col = Species)) +
  geom_point() +
  geom_point(data = df, col = 'blue')

from https://stackoverflow.com/questions/36541086/adding-a-extra-point-in-a-ggplot2-graph

上一篇 下一篇

猜你喜欢

热点阅读