alk*_*mid 5 python matplotlib polar-coordinates
import numpy as np
import seaborn as sbs
import matplotlib.pyplot as plt
r = np.arange(0, 3.0, 0.01)
theta = 2 * np.pi * r
ax = plt.subplot(111, polar=True)
ax.plot(theta, r, color='r', linewidth=3)
ax.set_rmax(2.0)
ax.grid(True)
ax.set_title("A line plot on a polar axis", va='bottom')
plt.show()
Run Code Online (Sandbox Code Playgroud)

如何将径向刻度标签(0.5,1.0,1.5,2.0)移动到不同的角度,比如120度?
Aje*_*ean 13
对于1.4或更高版本,您可以使用"set_rlabel_position".例如,将径向刻度线放置在135度的长线上:
ax.set_rlabel_position(135)
Run Code Online (Sandbox Code Playgroud)
相关文档存在于此处,有点隐藏在"投影"下.
添加上面的行产生(我没有seaborn所以这有默认的matplotlib格式):

在1.4之前,ax.set_rgrids可以采取角度论证.