Spiral graph plotting in python
Non interactive spiral plotting
from matplotlib.pyplot import *
from numpy import *
r = linspace(0,20,360)
t = linspace(0,2000,360)
x = r*cos(radians(t))
y = r*sin(radians(t))
plot(x,y)
Interactive spiral graph plotting in python
from matplotlib.pyplot import *
from numpy import *
from ipywidgets import *
def f(theta,radius):
    r = linspace(0,radius,360)
    t = linspace(0,theta,360)
    x = r*cos(radians(t))
    y = r*sin(radians(t))
    plot(x,y)
    axis('equal')
interactive_plot= interactive(f,theta=(360,2000),radius = (1,20))
interactive_plot

 
 
 
0 Comments
if you are not getting it then ask i am glad to help