1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
install.packages("ggplot2") library(ggplot2)
data("iris")
str(iris)
ggplot(data = iris, mapping = aes(x = Petal.Length, y = Petal.Width)) + geom_point() + geom_smooth(method="loess", se=F) + labs(subtitle="Area Vs Population", y="Population", x="Area", title="Scatterplot", caption = "Source: midwest")
|