Histograms

Introduction to the Tidyverse

David Robinson

Chief Data Scientist, DataCamp

Histogram

TNRM2C9.png

ggplot(gapminder_2007, aes(x = lifeExp)) +
  geom_histogram()
Introduction to the Tidyverse

Adjusting bin width

0rQSC2C.png

ggplot(gapminder_2007, aes(x = lifeExp)) +
  geom_histogram(binwidth = 5)
Introduction to the Tidyverse

Log x-axis

scale_x_log10()
Introduction to the Tidyverse

Let's practice!

Introduction to the Tidyverse

Preparing Video For Download...