Creating scatter plot - Python Mathplotlib Module

Creating scatter plot - Python Mathplotlib Module

Instructor-svgAl-Mamun Sarkar
Apr 02 , 2020

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')
plt.legend()
plt.show()

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram