Update scatter plot marker size and color - Python Mathplotib Module

Author: Al-mamun Sarkar Date: 2020-04-02 08:21:11

Update scatter plot marker size and color - Python Mathplotib Module. The following codes show how to draw Scatter plot and update marker size and color 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]

 

Update plot marker size:

plt.scatter(x_data, y_data, label="Scatter", color='m', s=200, 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()