Adding an extra point in a ggplot2 graph
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")
library('ggplot2')
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')
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")