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

Using of ax.set_ylim() for polar plot leads to "posx and posy should be finite values" error #11202

Closed
Milestone
@ussserrr

Description

@ussserrr

Bug report

Bug summary

I trying to run my 1-year-old polar plot (made with matplotlib 2.0.0) but with current 2.2.2 version get "posx and posy should be finite values" error. I found out that the error is caused by theax.set_ylim() method. Such way to manage the axis I've got from thisSO question/answer. So this case looks like broken compatibility with older scripts.

Code for reproduction

importnumpyasnpimportmatplotlib.pyplotaspltfig=plt.figure(dpi=120)ax=fig.add_axes([0.1,0.1,0.8,0.8],polar=True)ax.set_theta_zero_location('N')ax.set_theta_direction(-1)# anti-clockwiseax.set_ylim(90,-45)ax.set_yticks(np.arange(-45,90+0.1,15))plt.show()

Actual outcome

 ⌘  python3 bug_test.pyposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite values/Users/chufyrev/.local/share/virtualenvs/test-TGICRGwR/lib/python3.6/site-packages/numpy/core/_methods.py:29: RuntimeWarning: invalid value encountered in reduce  return umr_minimum(a, axis, None, out, keepdims)/Users/chufyrev/.local/share/virtualenvs/test-TGICRGwR/lib/python3.6/site-packages/numpy/core/_methods.py:26: RuntimeWarning: invalid value encountered in reduce  return umr_maximum(a, axis, None, out, keepdims)posx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite valuesposx and posy should be finite values

Matplotlib version

  • Operating system: macOS High Sierra 10.13.4
  • Matplotlib version: 2.2.2
  • Matplotlib backend (print(matplotlib.get_backend())): PyQt5
  • Python version: 3.6.5
  • Other libraries: numpy@1.14.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp