Shakl 16.25 - Mayavi modullari
403
Skalyar ma'lumotlar bilan ishlash modullari.
Glif
Ma'lumotlarni glif sifatida taqdim etadi:
x, y, z = np.ogrid [- 7 : 7 : 0.5 , - 7 : 7 : 0.5 , - 1 : 7 : 0.5 ]
skalar = x * x + y * y - z * z
src = mlab.pipeline.scalar_field (skalar)
mlab.pipeline.glyph (src)
mlab.show ()
16.26-rasm - Glif filtrining namoyishi
IsoSurface
Ma'lumotlarni izosurfalar sifatida ko'rsatish:
src = mlab.pipeline.scalar_field (skalar)
mlab.pipeline.iso_surface (src)
mlab.show ()
404
16.27-rasm - IsoSurface filtrining namoyishi
ScalarCutPlane
Ma'lumotlar to'plamining faqat sekant tomonidan ajratilgan qismini aks ettiradi
samolyot:
src = mlab.pipeline.scalar_field (skalar)
mlab.pipeline.scalar_cut_plane (src)
mlab.show ()
16.28-rasm - ScalarCutPlane modulining namoyishi
405
Yuzaki
Berilgan ma'lumotlar to'plamidan sirt hosil qiladi:
src = mlab.pipeline.scalar_field (skalar)
mlab.pipeline.surface (src)
mlab.show ()
Shakl 16.29 - Surface modulining namoyishi
Vektorli ma'lumotlarni vizualizatsiya qilish uchun modullar.
VectorCutplane
Vektorli ma'lumotlar uchun bo'laklarni yaratadi:
x, y, z = np.mgrid [ 0 : 3 : 0.5 , 0 : 3 : 0.5 , 0 : 3 : 0.5 ]
u = x * x
v = y
w = z
src = mlab.pipeline.vector_field (u, v, w)
mlab.pipeline.vector_cut_plane (src)
mlab.show ()
406
Shakl 16.30 - VectorCutplane modulining namoyishi
Vektorlar
O'tkazilgan vektorlar to'plamini beradi:
x, y, z = np.mgrid [ 0 : 3 : 0.5 , 0 : 3 : 0.5 , 0 : 3 : 0.5 ]
u = x * x
v = y
w = z
src = mlab.pipeline.vector_field (u, v, w)
mlab.pipeline.vectors (src)
mlab.show ()
Shakl 16.31 - Vektorlar modulining namoyishi
407
Tartibga solish
Oqim chiziqlarini o'rganishga imkon beruvchi interaktiv vosita,
o'tkazilgan vektorlar to'plamidan tuzilgan:
x, y, z = np.mgrid [ 0 : 3 : 0.5 , 0 : 3 : 0.5 , 0 : 3 : 0.5 ]
u = x * x
v = y
w = z
src = mlab.pipeline.vector_field (u, v, w)
mlab.pipeline.streamline (src, seedtype = 'tekislik' )
mlab.show ()
Shakl 16.32 - Streamline modulining namoyishi
Ma'lumotlar bilan ishlash modullari.
GridPlane
Modul modelga panjara bilan tekislikni joylashtiradi:
x, y, z = np.ogrid [- 7 : 7 : 0.5 , - 7 : 7 : 0.5 , - 1 : 7 : 0.5 ]
skalar = x * x + y * y - z * z
src = mlab.pipeline.scalar_field (skalar)
mlab.pipeline.grid_plane (src)
mlab.show ()
408
Shakl 16.33 - GridPlane modulining namoyishi
ContourGridPlane
Ma'lumotlar to'plami uchun konturlar to'plami bo'lgan tekislik.
CustomGridPlane
Tarmoqli foydalanuvchi tomonidan sozlanishi tekislikni yaratishga imkon beradi.
ImagePlaneWidget
Berilgan to'plam uchun interaktiv chiqib ketish tekisligini quradi
ma'lumotlar:
x, y, z = np.ogrid [- 7 : 7 : 0.5 , - 7 : 7 : 0.5 , - 1 : 7 : 0.5 ]
skalar = x * x + y * y - z * z
src = mlab.pipeline.scalar_field (skalar)
mlab.pipeline.image_plane_widget (src)
mlab.pipeline.volume (src)
mlab.show ()
409
16.34-rasm - ImagePlaneWidget modulining namoyishi
ImageActor
Ma'lumotlar to'plamini 2 o'lchovli tasvir sifatida ifodalaydi:
x, y = np.mgrid [- 2 : 2 : 0,1 , - 2 : 2 : 0,1 ]
z = np.cos (x * y) * np.sin (x * y)
src = mlab.pipeline.scalar_field (z)
mlab.pipeline.image_actor (src)
mlab.show ()
16.35-rasm - ImageActor modulining namoyishi
Tovush
3D modelini yaratadi:
410
x, y, z = np.ogrid [- 7 : 7 : 0.5 , - 7 : 7 : 0.5 , - 1 : 7 : 0.5 ]
skalar = x * x + y * y - z * z
src = mlab.pipeline.scalar_field (skalar)
mlab.pipeline.volume (src)
mlab.show ()
Shakl 16.36 - Volume modulining namoyishi
411
Xulosa
Kutubxonalar haqida iloji boricha ko'proq ma'lumot berishga harakat qildik
Matplotlib , Seaborn va Mayavi , umid qilamanki sizga ma'lumot
ushbu kitob sahifalarida uchrashgan, foydali ekanligi isbotlangan. agar sizda bo'lsa
sharhlar yoki tarkib bo'yicha takliflar, keyin bizga yozing
devpractice.mail@gmail.com, biz siz bilan gaplashishni istaymiz.
412
Do'stlaringiz bilan baham: |