Adding an extra point in a ggplot2 graph

前端 未结 3 1717
粉色の甜心
粉色の甜心 2021-02-20 15:19

I have created a plot of the Sepal.Length and the Sepal.Width (using the iris dataset) with ggplot2.

  ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, col =          


        
3条回答
  •  长情又很酷
    2021-02-20 15:43

    Add another layer:

    ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, col = Species)) + 
      geom_point() +
      geom_point(aes(x=5.6, y=3.9), colour="blue")
    

提交回复
热议问题