0% found this document useful (0 votes)
5 views1 page

Import Matplotlib

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Import Matplotlib

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

import matplotlib.

pyplot as plt
numbers=[150,77,32,11,6,1]
year=[2020,2021,2022,2023,2024,2025]
plt.plot(year,numbers,color="Blue")
plt.xlabel("YEAR")
plt.title("POPULATION OF DOLPHINS")
plt.show()

import matplotlib.pyplot as plt


years=[2019,2020,2021,2022,2023,2024,2025]
profit=[4,5,3,5,4,5,3]
plt.bar(years,profit,color="Red")
plt.xlabel('YEARS')
plt.ylabel('PROFIT')
plt.title('PROFIT OF COMPANY(MILLION $)')
plt.show()

import matplotlib.pyplot as plt


age=[16,17,18,19,20,21,22]
height=[160,165,171,172,173,175,176]
plt.scatter(age,height)
plt.xlabel('AGE')
plt.ylabel('HEIGHT(in cm)')
plt.title('Scatter Plot with Matplotlib')
plt.show()

import matplotlib.pyplot as plt


marks=[10,11,11,12,12,12,12,13,13,13,14,15]
plt.hist(marks,bins=5)
plt.xlabel('X')
plt.ylabel('Y')
plt.title('HISTOGRAM')
plt.show()

You might also like