我的图标题覆盖了python中的极坐标直方图,因此我遇到了问题。 我想在“ pi / 2”上方显示剧情标题,该如何处理?
问题示例:
f = plt.figure()
ax = f.add_subplot(polar=True)
N = 120
angles = np.random.uniform(0,2*np.pi,8000)
distribution = np.histogram(angles, bins=N, range=(0.0, 2*np.pi))[0]
theta = (np.arange(N)+0.5)*2*np.pi/N
width = 2*np.pi / N # Width of bars
colors = plt.cm.hsv(theta/2/np.pi)
ax.bar(theta, distribution, width=width, color=colors)
ax.set_rticks([]) # Hides radius tics
ax.set_xticklabels([r'$0$', r'$\frac{\pi}{4}$', r'$\frac{\pi}{2}$',r'$\frac{3\pi}{4}$',
r'$\pi$',r'$\frac{5\pi}{4}$',r'$\frac{3\pi}{2}$',r'$\frac{7\pi}{4}$'])
ax.tick_params(labelsize=15)
ax.set_title('Polar histogram over angles')
plt.show()
答案 0 :(得分:1)
您可以使用TXImage = class
public
constructor Create();
destructor Destroy();
DWORD GetPixelVal(DWORD row, DWORD col);
DWORD _height;
DWORD _width;
DWORD _pixel_depth;
BYTE* _data_;
end;
关键字来确定剧情和标题之间的空间:
pad