matplotlib中的极轴

matplotlib中的极轴,matplotlib,label,axis,polar-coordinates,Matplotlib,Label,Axis,Polar Coordinates,我正在尝试使用Matplotlib在极坐标图中设置r轴。此时,我得到的最好结果如下: 我想修改三件事: 为带有标签的轴绘制较粗的线 将记号添加到其他r轴 将图例移到绘图之外 我期待这样的事情: 谢谢你的帮助 法学博士 ''' ''新的预期结果看起来像是x、y、z笛卡尔坐标图,而不是极坐标图。matplotlib不会以这种方式绘制极坐标图。极坐标图可能不是最好的工具。但我不知道更好的。 r = [0.07109986, 0.07186792, 0.07128804, 0.07093468, 0

我正在尝试使用Matplotlib在极坐标图中设置r轴。此时,我得到的最好结果如下:

我想修改三件事:

  • 为带有标签的轴绘制较粗的线
  • 将记号添加到其他r轴
  • 将图例移到绘图之外
  • 我期待这样的事情:

    谢谢你的帮助

    法学博士

    '''


    ''

    新的预期结果看起来像是x、y、z笛卡尔坐标图,而不是极坐标图。matplotlib不会以这种方式绘制极坐标图。极坐标图可能不是最好的工具。但我不知道更好的。
    r = [0.07109986, 0.07186792, 0.07128804, 0.07093468, 0.11061314,\
       0.11480423, 0.09913993, 0.13417775, 0.07485087, 0.07140557,\
       0.08117919, 0.1235301 , 0.07109986]
    
    theta = 2.0*np.pi*np.arange(len(r))/(len(r)-1)
    
    titles = ['$a$','$\\alpha$','$b^{1}$','$b^{2}$',\
          '$c^{1}_{1}$','$c^{1}_{2}$','$c^{1}_{3}$','$c^{1}_{4}$',\
          '$c^{2}_{1}$','$c^{2}_{2}$','$c^{2}_{3}$','$c^{2}_{4}$']
    
    fig = plt.figure()
    ax = fig.add_subplot(111,polar='True')
    
    ax.plot(theta,r)
    
    ax.spines['polar'].set_visible(False)
    
    ax.set_theta_zero_location(loc='N')
    ax.set_xticks(np.arange(0,2.0*np.pi,2.0*np.pi/len(titles)))
    ax.set_xticklabels(titles)
    
    ax.yaxis.grid(False)      
    
    ax.set_rlabel_position(0)
    plt.tick_params(axis='y',labelsize=12)
    
    plt.show()