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.