Histograms

Histograms show the distribution of data for a continuous variable, specified with geom_histogram().

ggplot(data = penguins, mapping = aes(x = body_mass_g)) +
  geom_histogram()

Changing either the number of bins, or the width of those bins, can greatly affect the resulting visual. Compare the two below graphs to the initial histogram (notice you can specify bins or binwidth).

ggplot(data = penguins, mapping = aes(x = body_mass_g)) +
  geom_histogram(bins = 100)

ggplot(data = penguins, mapping = aes(x = body_mass_g)) +
  geom_histogram(binwidth = 200)

When creating a histogram of your data, you will likely want to try different binning schemes to see what provides the best representation of your data. Generally you want to avoid histograms that look like barcodes as well as ones that look like a single block.