我正在尝试增加极地投影上的theta和r刻度线大小。我的代码是:
import numpy as np
import matplotlib.pyplot as plt
theta = np.arange(1,360,5)
r=theta/theta
font = {'family': 'serif',
'color': 'black',
'weight': 'normal',
'size': 25,
}
ax = plt.subplot(111, projection='polar')
ax.plot(theta, r,'bo',linewidth=1)
ax.set_rmax(1.1)
ax.set_rticks([0.25, 0.5, 0.75,1]) # less radial ticks
ax.grid(True)
ax2=plt.axes((.15,.135,0,0.73))
ax2.xaxis.set_visible(False) # hide x axis
ax2.set_yticks(np.linspace(0,1,11)) # set new y-tick positions
ax2.set_yticklabels(['1','0.8','0.6','0.4','0.2','0','0.2','0.4','0.6','0.8','1 '])
plt.ylabel("Normalized Output Power",fontdict=font)
plt.yticks(fontsize=17)
plt.show()
我不需要x轴,并且已经增加了尺寸并固定了y轴的位置。该图看起来像这样,但是度数以及0-1径向数都太小。有什么帮助吗? The plot looks like this but the degree numbers as well as the 0-1 radial ones are too small.