Exploring scatter plots
Scatter plots are one of the most powerful types of visualizations that you can create. In a very compact area, a scatter plot can help you visualize the relationship between two variables, measure the scale of individual data points, and even see how these relationships and scales may vary within different categories. Being able to effectively visualize data in a scatter plot represents a significant leap in analytical capabilities when lined up against some of the more commonplace visualizations we have seen so far.
In this recipe, we will explore how we can measure all of these things at once just on one scatter plot.
How to do it
Scatter plots by definition measure the relationship of at least two variables. As such, the scatter plot can only be created with a pd.DataFrame
. A pd.Series
simply does not have enough variables.
With that said, let’s create a sample pd.DataFrame
that contains four different columns of data. Three of these...