import matplotlib.pyplot as plt
import numpy as np
theta = np.array([0,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,240,255,270,285,300,315,330,345,360])
a0 = np.array([0.005,0.119,0.495,1.000,1.545,1.961,2.126,1.909,1.617,1.085,0.561,0.156,0.004,0.120,0.492,1.030,1.504,1.930,2.066,1.908,1.619,1.064,0.562,0.159,0.004])
a30 = np.array([0.860,0.635,0.521,0.554,0.675,0.917,1.152,1.367,1.460,1.436,1.324,1.104,0.837,0.655,0.540,0.549,0.674,0.913,1.133,1.397,1.636,1.635,1.352,1.088,0.797])
a45 = np.array([1.034,1.017,1.002,0.973,0.982,1.002,1.008,1.063,1.081,1.091,1.121,1.101,1.068,1.016,1.001,0.981,0.984,1.011,1.064,1.023,1.053,1.124,1.070,1.124,1.092])
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.figure(figsize=(6,6))
ax = plt.subplot(111, polar=True)
t_rad = np.radians(theta)
ax.plot(t_rad, a0, color='k', label=r'$\alpha=0^\circ$')
ax.plot(t_rad, a30, color='r', label=r'$\alpha=30^\circ$')
ax.plot(t_rad, a45, color='b', label=r'$\alpha=45^\circ$')
ax.set_theta_zero_location('E')
ax.set_theta_direction(-1)
ax.set_rlabel_position(90)
ax.set_ylabel('光功率示数 (mW)')
ax.legend(loc="upper right",bbox_to_anchor=(1.3,1.1))
plt.tight_layout()
plt.show()
plt.show()
To embed this project on your website, copy the following code and paste it into your website's HTML: