Histogram plots
A histogram includes an accurate representation of the distribution of numerical data. It includes a rough estimation of the probability distribution with the continuous variable. It differs from a bar graph. A bar graph compares two variables, and a histogram just one. In this section, we will focus on the use of histogram plots and how to draw and customize them. The iris dataset includes fewer attributes, so we can customize them as and when required.
Before understanding the customization of histograms with ggplot2, we should understand the normal plotting of the iris dataset. The difference between normal plotting and the plots created with ggplot2 will be clearly visible from the output screenshots.
The following command ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access