In this tutorial, you’ll learn how to draw an Error Bars in Glimpse. You can use it to indicate an estimated error or uncertainty. You can also give a general sense of how precise a measurement is. Error bars can be used to display the standard deviation, standard error, confidence intervals, or interquartile range.
In this example, we will be applying Error Bars to a Dot Graph. However, you can also apply Error Bars to other marks, such as: Bar, Shape, Square, Line, etc.
Start by adding data from a sample JSON file. Go to the top menu and choose Data > Sample Data > and select the barley.json file.
Then, under Visual > Mark in the Inspector panel to the right side of the UI, set the Mark Type to Circle.
From the left side of the UI, drag the yield field into the X encoding. Then, go to the Inspector panel and set the Aggregate to Average.
Now, drag the variety field into the Y encoding.
Let’s set the error bars now. From the top menu, choose Insert > Layer > Error Bar, and drag the fields yield into the X encoding and variety into the Y encoding.
To set the extent of the rule, go to the Inspector panel*, open **Visual > Mark > Extent and choose Standard Deviation from the dropdown.
In this place of the app, you can set the Error Bars to be based on:
Standard Deviation (the default), Confidence Interval, Standard Error, Q1-Q3 which is the interquartile range from the first quartile to the third quartile.
Now, expand the Ticks section below and set the Color to black to display the end ticks. The Black color is in the Grey Hues color pallette - you will need to scroll down a bit to find it.
Done! This is how you draw Error Bars in Glimpse. If you want to further customize your chart, please read the documentation.