A scatterplot is a graph in which the values of **two variables** are plotted along two axes, the pattern of the resulting points revealing any **correlation** present.

Here we plot the relationship between Sepal width and Sepal length of several plants.

It illustrates the basic utilization of ggplot2: **1/** provide a dataframe, **2/** tell which variable to show on x and y axis, **3/** add a geom_point to show points.

See next graph to learn how to custom it!

1 2 3 4 5 6 7 8 9 10 11 |
# library library(ggplot2) # The iris dataset is proposed by R head(iris) # basic scatterplot ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width)) + geom_point() |

Not what you are looking for ? Make a new search !

`[mediatagger]`

## Leave a Reply

Be the First to Comment!