Why does histogram produce a line plot?

I have a dataframe df and I’m trying to plot a histogram of all the values in the third column of df like this:

using Plots 

I am expecting the histogram to appear as bars, but instead it gets plotted as this line:

What’s going on here? How do I encourage the histogram function to plot the histogram as a standard bar plot?

That’s just the default behaviour for when you have more than 1 million values - essentially the histogram turns into a density at those very fine resolutions.

You can pass fill = true if you just want to fill the area under the curve, not sure how you get the actual bars to show but imho it doesn’t look great when the bars are hardly wider than their outlines - this is what it looks like for 1m observations, where bars are still plotted:


1 Like

Thanks @nilshg! Are the optional input arguments for histogram documented somewhere that I’m missing?