Python MatPlotLib Bar Chart, Histogram Tutorial 3

Опубликовано: 08 Октябрь 2024
на канале: MyStudy
4,016
25

This Video Will Explain about creating Bart chart and histogram chart MatplotLib function.

Bar Chart :
X = [1,2,3,4,5,6]
Y = [10,3,-5,6,7,1]
plt.bar(X,Y)
plt.show()

Histogram :
import numpy as np
age = 40 + np.floor(60*np.random.rand(100))
age_bins = [40,50,60,70,80,80,100]
plt.hist(age, age_bins)
plt.show()