Hey Everyone In last We have seen Pie Chart in Today's Video We are going To learn Scatter Plot. Scatter Plot is Mainly use to understand the Correlation Between Two or More variables .
In this Video We will Learn How to set Color Bar to Our Scatter Plot and Also We Will Learn How to Customize Our Scatter Plot .
If You Have Any Question About Scatter Plot Ask Me In Comment Section.
Code: -
===========================================================
from matplotlib import pyplot as plt
x=[1,5,2,6,8,5,3,5,9,3,5,3,7]
y=[9,3,4,6,7,8,9,7,5,4,6,7,4]
color=[1,2,5,7,5,2,4,6,7,8,6,4,6]
plt.scatter(x,y,s=100,marker="o",c=color,edgecolors="Black",linewidths=0.5,alpha=1,label="Happy")
cbar=plt.colorbar()
cbar.set_label("Happiness")
plt.legend()
plt.show()
============================================================
Data That I used in This Video : -
x=[1,5,2,6,8,5,3,5,9,3,5,3,7]
y=[9,3,4,6,7,8,9,7,5,4,6,7,4]
color=[1,2,5,7,5,2,4,6,7,8,6,4,6]
Sur cette page du site, vous pouvez voir la vidéo en ligne Matplotlib Tutorial | Create Scatter Plot ,Colorbar (Tutorial 4) durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Manav Rao 13 avril 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 229 fois et il a aimé 9 téléspectateurs. Bon visionnage!