xticks(), yticks(), xlabel(), ylabel(), xlim(), ylim() Methods in Matplotlib

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

Program 1

import matplotlib.pyplot as mat
x=[0,10,20,30,40,50]
y=[0,100,200,300,400,500]
mat.plot(x,y)
mat.xlabel("Product")
mat.ylabel("Price")
mat.title("Product Range Graph")
# mat.xticks(x,['A','B','C','D','E','F'])
# mat.yticks(y,['0-10','10-20','20-30','30-40','40-50','50-60'])
mat.xlim([0,100])
mat.ylim([0,1000])
mat.show()

 

Did you know we work 24x7 to provide you best tutorials
Please encourage us - write a review on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

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