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 =
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")
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')