Data Visualization using Scatter Plot and Seaborn

If you have to plot your data in a graphical format smartly so that the stakeholders can understand the insight clearly and effectively then you may like to explore Seaborn.

Data visualization is the presentation of data in a visual or graphical manner. With the help of data visualization, decision makers can understand difficult concepts related to data or identify new patterns.

For example if we want to know how the total impressions and total clicks for a website is changing over a period of time we may like to plot a graph like below.


Seaborn is a data visualization library based on Python and Matplotlib. Matplotlib is another basic data visualization library for Python.

Scatter Plot

Scatterplot is a way to view the correlation between two numerical variables using graphs. Seaborn provides different scatterplot options to visualize this correlation and to provide valuable insights.

To understand the scatter plot better let us use a sample data set called Diabetes Data Set.

Import the necessary libraries

import numpy as np
import pandas as pd
import seaborn as sns

Load the dataset

data = 'pima-diabetes.csv'
df = pd.read_csv(data)
pima diabetes data set

Plot the scatter plot for age and blood pressure

sns.scatterplot(x=df.Age, y=df.BloodPressure, data=df) 
Seaborn Scatter Plot

End Notes:

In this tutorial we saw how to create scatter plot using seaborn and python. We used famous dataset called pima diabetes to demonstrate the scatter plot.

Happy coding !!


Leave a Reply