In this tutorial, we’ll demonstrate how to draw a Histogram in Glimpse to visualize the distribution in a dataset. Histograms help provide an estimate as to where values are concentrated, what the extremes are and whether there are any gaps or unusual values.

First, add in the data by going Data > Sample Data > movies.json from the top menu.

Then, under Visual > Mark in the Inspector panel, set the Mark Type to Bar.


Click on the Y encoding well.


Then in the Inspector panel press Field


And under Aggregate, select Count.


After, drag the quantitative field IMDB_Rating into the X encoding.


Because the graph is overly ‘peaky’, we need to arrange the data values into ‘bins’. This can be done by enabling Bin in the Inspector panel (located under Visual > Encoding).


Under the Bin menu, there are options to specify the bin settings. By default, Nice is ticked, which automatically attempts to make bin boundaries that are human-friendly, such as using multiples of 10.


One way to change the number of bins is through the Max Bins field. If you enter 4 the number of bars will be reduced.


Increasing the number will increase the number of bins and therefore the number of bars displayed.


This concludes this tutorial on drawing a Histogram. If you want to further customize your chart, please read the documentation.