Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adding twin axes into polar coordinate system #12506

Closed as not planned
Closed as not planned
Labels
New featurestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Actiontopic: polar
@519165198

Description

@519165198

Bug report

Adding twin x Axes into polar coordinate system seems does not work
Bug summary

Code for reproduction

importnumpyasnpfrommatplotlib.tickerimportFormatStrFormatterimportmatplotlib.pyplotaspltlabels=np.array(['E','','N','','W','','S',''])dataLength=8data=np.array([3.23,3.23,9.68,3.23,12.90,32.26,6.45,29.03])angles=np.linspace(0,2*np.pi,dataLength,endpoint=False)width=np.pi/8*np.array([1]*8)ax=plt.subplot(111,projection='polar')ax2=ax.twinx()bars=ax.bar(angles,data,alpha=0.4,label=labels,width=width,bottom=0.0,color="red")data=np.array([10.3,2.23,15.68,13.23,12.90,12.26,8.45,29.03])data=np.concatenate((data, [data[0]]))angles=np.concatenate((angles, [angles[0]]))plots=ax.plot(angles,data,alpha=0.7,linestyle="--",linewidth=1,color="blue")plt.fill(angles,data,facecolor='blue',alpha=0.25)gridLines,gridLabel=ax.set_thetagrids(angles*180/np.pi,labels,fontproperties="DejaVu Sans")ax.yaxis.set_major_formatter(FormatStrFormatter('%d%%'))plt.yticks(fontsize=8)plt.xticks(fontsize=15)[label.set_fontweight('bold')forlabelinax.get_xticklabels()][label.set_color('blue')forlabelinax.get_yticklabels()]plt.show()

Actual outcome

Expected outcome

Matplotlib version

  • Operating system:
  • Matplotlib version:
  • Matplotlib backend (print(matplotlib.get_backend())):
  • Python version:
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Labels

    New featurestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Actiontopic: polar

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp