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

การปรับความกว้างของช่วง (bin width)

0rQSC2C.png

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

แกน x แบบ Log

scale_x_log10()
Introduction to the Tidyverse

มาฝึกกันเถอะ!

Introduction to the Tidyverse

Preparing Video For Download...