Adding an extra point in a ggplot2 graph

前端 未结 3 1685
粉色の甜心
粉色の甜心 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:44

    Using annotate:

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

提交回复
热议问题