Having created the basic object, we are now ready to start adding our first data traces to our first chart.

Getting to know the data attribute

First, we start by adding a scatterplot using a very small and simple dataset. Later in the chapter, we’ll use our poverty dataset to create other plots. Once we have created our Figure object and assigned it to a variable, we have access to a large number of convenient methods to manipulate that object. The methods related to adding data traces all start with add_, followed by the type of chart we’re adding, for example, add_scatter or add_bar.

Create a scatterplot

Let’s go through the full process of creating a scatterplot.

Get hands-on with 1200+ tech skills courses.