An histogram is an accurate graphical representation of the distribution of numerical data. It takes as input one numerical variable only. The variable is cut into several bins, and the
number of observation per bin is represented by the height of the bar. Note that the shape of the histogram can be really different following the number of bins you set. Thus, try different
values before taking any conclusion. Note that it is really close to density plot. To compare several distributions, add them on the same axis or use violinplots.
Sponsors
Input format
To make an histogram, you need only one vector of numbers. It can be a list, or the column of a data frame. The histogram will cut this variable in several bins (X axis), and count the number of data points in each bin (Y axis).
If you have several numerical variable, you can do several histograms and compare them, or do a boxplot or violin plot.
Format 1: 1 numerical variable only.
Seaborn
- #20 Basic Histogram | Seaborn
- #20 Control bins on seaborn histogram
- #21 Histogram only | seaborn
- #21 Histogram with Rug
- #21 Custom rug | seaborn
- #21 Custom density | seaborn
- #23 Vertical Histogram | seaborn
- #24 Histogram with boxplot on top
- #25 Histogram with several variables
- #25 Histogram with faceting
- #82 Default Marginal plot
- #82 Custom marginal area
related
- VIOLIN
- DENSITY
- BOXPLOT