Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб How to: Make a Polar Plot in Python в хорошем качестве

How to: Make a Polar Plot in Python 3 года назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



How to: Make a Polar Plot in Python

Learn how to make a 2D contour plot in Python in polar coordinates. Script can be found here: https://www.hageslab.com/Resources.ht... Here we are using "Spyder" IDE with the numpy and matplotlib libraries Script: import numpy as np import matplotlib.pylab as plt def T(theta,a,b): return a*np.sin(theta*b) def R(r,c,d): return c*np.cos(r*d) rlist=np.arange(0,4.01,0.01) #Angstroms thetalist=np.radians(np.arange(0,361,1)) #Radians rmesh, thetamesh = np.meshgrid(rlist, thetalist) #Generate a mesh a = 1.5 b = 2 c = 2 d = 1.6 FullFunction = T(thetamesh,a,b)*R(rmesh,c,d) FullFunction2 = FullFunction**2*rlist**2 fig, ax = plt.subplots(dpi=120,subplot_kw=dict(projection='polar')) ax.contourf(thetamesh, rmesh, FullFunction, 100, cmap='plasma') fig, ax = plt.subplots(dpi=120,subplot_kw=dict(projection='polar')) ax.contourf(thetamesh, rmesh, FullFunction2, 100, cmap='plasma')

Comments