Seaborn Scatter Plot – Tutorial and Examples
Introduction
Seaborn is one of the most widely used data visualization libraries in Python, as an extension to Matplotlib. It offers a simple, intuitive, yet highly customizable API for data visualization.
In this tutorial, we’ll take a look at how to plot a scatter plot in Seaborn. We’ll cover simple scatter plots, multiple scatter plots with FacetGrid as well as 3D scatter plots.
Import Data
We’ll use the World Happiness dataset, and compare the Happiness Score against varying features to see what influences perceived happiness in the world:
import pandas as pd
df = pd.read_csv('worldHappiness2016.csv')
Plot a Scatter Plot in Seaborn
Now, with the dataset loaded, let’s import PyPlot, which we’ll use to show the graph, as well as Seaborn. We’ll plot the Happiness Score against the country’s Economy (GDP per Capita):
import matplotlib.pyplot as plt
import seaborn as