Amaliy qismi
Matplotlib kutubxonasini o’rnatish
Pip install matplotlib
Matplotlib yordamida chiziqli chizma
from matplotlib import pyplot as plt
x = [5, 2, 9, 4, 7]
y = [10, 5, 8, 4, 2]
plt.plot(x,y)
plt.show()
Matplotlib yordamida bar chizish
from matplotlib import pyplot as plt
x = [5, 2, 9, 4, 7]
y = [10, 5, 8, 4, 2]
plt.bar(x,y)
plt.show()
Matplotlib yordamida gistogramma
from matplotlib import pyplot as plt
x = [5, 2, 9, 4, 7]
y = [10, 5, 8, 4, 2]
plt.hist(x+y)
plt.show()
Matplotlib yordamida pirog diagrammalarini yaratish
from matplotlib import pyplot as plt
x = [5, 2, 9, 4, 7]
y = [10, 5, 8, 4, 2]
plt.pie(x+y)
plt.show()
Dostları ilə paylaş: |