...

/

Visualization with Point Plots

Visualization with Point Plots

Learn how to plot, design, and interpret point plots for data visualizations.

Overview

Point plot represents the central tendency estimates for numerical variables using scatter plot points, such as mean, standard deviation, and so on. We can understand how the value of one variable changes across another variable.

Plotting point plots

We import the required libraries pandas, seaborn, numpy, and matplotlib. Next, we set the seaborn default theme using sns.set_theme() and import the diamonds dataset. We use the head() function to view the first five records, as shown in the code below:

Press + to interact
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
sns.set_theme()
diamonds_df = sns.load_dataset('diamonds')
print(diamonds_df.head())

To begin, let’s plot a point plot between cut and depth using the sns.pointplot() function. The resulting plot is shown below. We can see ...