Scatterplots
Learn about five commonly used plots and how to create a scatterplot in R.
We'll cover the following...
Needed packages
Let’s load all the packages needed for the upcoming programs:
library(nycflights13)library(ggplot2)library(dplyr)
Load packages
Five named graphs: The 5NG
In order to keep things simple in this course, we’ll only focus on five different types of graphics, each with a common given name. We term these the five named graphs, or in abbreviated form, the 5NG:
Scatterplots
Line graphs
Boxplots
Histograms
Barplots
Overview of scatterplots
The simplest of the 5NG are scatterplots, also called bivariate plots. They allow us to visualize the relationship between two numerical variables. While we ...