Matplotlib Line Style and Markers

Machine Learning courses with 100+ Real-time projects Start Now!!

Program 1

import matplotlib.pyplot as plt
x=[10,20,30,40,50]
y=[10,50,40,30,20]
#plt.plot(x,y,ls="solid",lw=3,c='k')
plt.plot(x,y,marker="o",mec='k',mfc='r',ms=10,ls="solid",lw=5,c='b')
plt.title("Student Info")
plt.xlabel("X-Axis")
plt.ylabel("Y-Axis")
plt.show()



# o-circle
# d-Dimond
# p-Pentagon
# h-Hexagone
# * -star
# + Plus 
# _ Horigantal lines

# | Vertical line









#ls  lw c

# Solid
# dotted
# dashed
# dashdot
#None
#c

 

 

 

You give me 15 seconds I promise you best tutorials
Please share your happy experience on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

Your email address will not be published. Required fields are marked *