Site icon DataFlair

Matplotlib Line Style and Markers

Machine Learning courses with 110+ 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

 

 

 

Exit mobile version