Menu

Scatterplot

In this tutorial, we’ll demonstrate how to draw a Scatterplot in Glimpse to visualize the relationship between horsepower and miles per gallons for various cars.

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

Then, under Viz > Mark in the Inspector panel, set the Mark type to Shape.

image1


To set the variable for the X-axis, drag the quantitative field Horsepower into the X encoding.

image2


To set the variable for the Y-axis, drag the quantitative field Mile_per_Gallon into the Y encoding.

image3


To vary the color of the plotted points based on a variable, drag the Origin field into the Color encoding.

image4


To vary the shape of the plotted points based on a variable, drag a Nominal field into the Shape encoding (Origin was used again in this example).

image5


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