A simple scatter plot

ggplot is based on Leland Wilkinson’s “The Grammar gf Graphics” as
implemented by Hadley Wickham for the R language.

To generate a chart, we create a new chart object around a dataset, and
specify a set of aesthetic mappings for it. In this example, we map the
values in the “carat” column to the x-axis of the chart and the values
in the “price” column to the to y -axis.

We then specify the sort of geometric mapping we want to apply to the
chart object - in this case, a simple scatter plot identify as a
“geom_point() mapping” (that is, each row of data maps onto a point
geom item using the declared aesthetic mapping.