19.6 Histograms

Simple histogram on one sample (using the df2 data frame):

## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Histogram on more samples (using df_long):

## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Split the data per sample (“variable” column that represents here the samples):

## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

By default, the histograms are stacked: change to position dodge (side by side):

## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.