I am transforming some data from cartesian to polar values, I would like to know:
how to annotate the values of the angles to the polar plot, I could plot the values but when annotating, all the values are not in their respective points.
how to generate the real values since the angles from negatives axes don't present the real angle, should apply this for each quadrant? I Use the calculator value II Add 180° to the calculator value III Add 180° to the calculator value IV Add 360° to the calculator value
here is my code: `
for i in coorvalues:
rho = np.sqrt(a**2 + b**2)
phi = np.arctan2(a, b)
polarcoor= (rho,phi, capacity)
polarvalues= list(zip(rho,phi,capacity))
print('they are the raw polar values(r,theta,capacity): ', polarvalues)
#plot the polar coordinates
ax = plt.axes(polar=True)
plt.scatter(phi[0:],rho[0:], c="g", s=30)
for i in range(len(rho)):
ax.annotate(phi, xy=(phi[0], rho[0]))
plt.show()
`
and here is the image of the results: