Many histogram functions part of scientific analysis software has the default configuration to fill the histogram. Examples are Matlab and Matplotlib. On the other hand, the default for line plots is to not fill the area below the line. Both behaviours can be altered.
One disadvantage of filling is that it makes it more difficult to visualise different quantities in the same axes, unless it is natural to stack them. What is the reason that it is usual to fill the area under a histogram?
Below is the same data with histograms shown in three different ways using Matplotlib:
A traditional bar-style histogram (
hist(X, 50, histtype='bar', edgecolor='none')):
A step-style histogram (
hist(X, 50, histtype='step')):
And finally, a step-fill histogram with α=0.2 (
hist(X, 50, histtype="stepfilled", alpha=0.2)):