This code plots a particular row of phases given in a NumPy array on a circle of radius 2pi using the matplotlib module.
How can I draw straight lines from the origin(0,0) to these points/phases plotted on the circle?
import numpy as np
import matplotlib.pyplot as plt
def circle(theta):
circle_angle = np.linspace(0, 2*np.pi, 100)
radius = np.sqrt(1)
plt.figure()
fig, ax = plt.subplots(1)
x1 = radius*np.cos(circle_angle )
x2 = radius*np.sin(circle_angle )
plt.plot(x1, x2)
ax.set_aspect(1)
plt.grid(linestyle = '--',axis='both')
plt.plot(radius*np.cos(theta[:1]),radius*np.sin(theta[:1]),'*')
theta = np.array([[1, 2.3, 3,4,4.5], [4.2, 5, 6,3.6,4.3],[2,3,4,3.4,5.6],[0.2,3.4,4.5,6,4]])
print(theta[:,1])
circle(theta)