Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
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
Labels
No labels