Matplotlib da Figure moduli




Download 8,58 Kb.
bet4/4
Sana17.01.2024
Hajmi8,58 Kb.
#139190
1   2   3   4
Bog'liq
Elektron ta’lim resurslarini yaratish texnologiyalari-kompy.info

Matplotlib da Figure moduli



Ma’ruzachi: Rustamov H.Sh, E-mail: rhsh0405@gmail.com, Telefon: 91-979-04-75

matplotlib.pyplot.figure() funksiyasi matplotlib kutubxonasi moduli bo’lib yangi figuralar hosil qilish uchun foydalaniladi



Ma’ruzachi: Rustamov H.Sh, E-mail: rhsh0405@gmail.com, Telefon: 91-979-04-75

frameon : Bu parametr rasm ramkasini chizishni amalga oshiradi.

FigureClass : Ushbu parametr maxsus shakl namunasidan foydalanadi.

clear : Agar bu parametr True bo’lsa chizma yoki qaralayotgan shakl allaqachon mavjud bo’lib, u o'chiriladi.

Return value: Bu usul quyidagi qiymatlarni qaytaradi:

figure : Bu parametr Figure moduli namunasini qaytaradi, shuningdek uni backend dagi new_figure_manager ga uzatiladi.



Ma’ruzachi: Rustamov H.Sh, E-mail: rhsh0405@gmail.com, Telefon: 91-979-04-75

NAMUNA:

# matplotlib funksiyasining ishlatilishi

import matplotlib.pyplot as plt

import matplotlib.lines as lines

fig = plt.figure()

fig.add_artist(lines.Line2D([0, 1, 0.5], [0, 1, 0.3]))

fig.add_artist(lines.Line2D([0, 1, 0.5], [1, 0, 0.2]))

plt.title('matplotlib.pyplot.figure() Example\n',

fontsize = 14, fontweight ='bold')

plt.show()



http://kompy.info
Download 8,58 Kb.
1   2   3   4




Download 8,58 Kb.