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

Issue rendering polar plot (agg backend?) with rorigin set #17418

Closed
Milestone
@NelleV

Description

@NelleV

Bug report

When saving a png of a polar plot with the r-origin set "by hand," saving the result as a png plot doesn't work as expected. Saving it as PDF works as expected. Working interactively and saving it with the UI as a png works as expected.

importmatplotlib.pyplotaspltimportnumpyasnpfrommatplotlib.gridspecimportGridSpecnbins=50data=np.random.randint(0,42,nbins)fig=plt.figure()ax_g=fig.add_subplot(polar=True,facecolor="none")theta=np.array(    [np.pi/2-i*2*np.pi/len(data)foriinrange(len(data))])lines=ax_g.plot(theta,data)ax_g.set_rorigin(-78)# Replacing this with ax_g.set_rmin works as expected, so the problem comes from this line.fig.savefig("bug.png")fig.savefig("bug.pdf")

Actual outcome

bug

Expected outcome

bug.pdf

Matplotlib version

  • Operating system: Ubuntu
  • Matplotlib version: 3.2.1
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg (tried with Agg, and other backends)
  • Python version: 3.8.2
  • Jupyter version (if applicable): NA
  • Other libraries:  NA

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp