Creating scatter plot - Python Mathplotlib Module

Author: Al-mamun Sarkar Date: 2020-04-02 08:03:04

Creating Scatter Plot - Python Mathplotlib Module. The following codes show how to plot Scatter graph using python mathplotlib module.


Import Module:

import matplotlib.pyplot as plt


Create Dataset:

x_data = [10,20,30,40,50,60,70,80]
y_data = [50,20,40,20,10,40,50,20]

Scatter Plot:

plt.scatter(x_data, y_data, label="Scatter", color='k', marker='o')
plt.title("Welcome to scatter ploting tutorial")
plt.xlabel('Plot Number on X-Axis')
plt.ylabel('Important Var on Y-Axis')