I would like to make a double angle polar plot that goes from 0 to 180 anticlockwise

16 views Asked by At

The polar plot must have in the perpendicular axis the values of 45 and 135 degrees and in the horizontal the values of 0 and 90 degrees, as shown in the figure. Any ideas?

I tried this to change the values in different axis but without solution.

import numpy as np
import matplotlib.pyplot as plt 
#Generate data
angles = np.linspace(0, 360, 100)
double_angles = 2 * angles
#Calculate astigmatic components for double angles
radial_double = np.cos(np.radians(double_angles))
tangential_double = np.sin(np.radians(double_angles)) 
#Create a double polar plot
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
#Set x-axis limits to display only 0 to 180 degrees
ax.set_xlim(0, np.radians(360))
#Add labels and legend
ax.set_rlabel_position(360)
ax.set_title("Double Polar Plot (0 to 180 degrees)")
ax.legend()
#Show the plot
plt.show()`
0

There are 0 answers