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

FIX: polar set_rlim allow bottom-only call#13465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dstansby merged 2 commits intomatplotlib:masterfromjklymak:fix-polar-bottom
Feb 23, 2019
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletionslib/matplotlib/projections/polar.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1202,9 +1202,8 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
'argument and kwarg "ymax"')
else:
top = ymax
if top is None and len(bottom) == 2:
top = bottom[1]
bottom = bottom[0]
if top is None and np.iterable(bottom):
bottom, top = bottom[0], bottom[1]

return super().set_ylim(bottom=bottom, top=top, emit=emit, auto=auto)

Expand Down
21 changes: 21 additions & 0 deletionslib/matplotlib/tests/test_axes.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -794,6 +794,27 @@ def test_polar_theta_limits():
ax.yaxis.set_tick_params(label2On=True, rotation='auto')


@check_figures_equal(extensions=["png"])
def test_polar_rlim(fig_test, fig_ref):
ax = fig_test.subplots(subplot_kw={'polar': True})
ax.set_rlim(top=10)
ax.set_rlim(bottom=.5)

ax = fig_ref.subplots(subplot_kw={'polar': True})
ax.set_rmax(10.)
ax.set_rmin(.5)


@check_figures_equal(extensions=["png"])
def test_polar_rlim_bottom(fig_test, fig_ref):
ax = fig_test.subplots(subplot_kw={'polar': True})
ax.set_rlim(bottom=[.5, 10])

ax = fig_ref.subplots(subplot_kw={'polar': True})
ax.set_rmax(10.)
ax.set_rmin(.5)


@image_comparison(baseline_images=['axvspan_epoch'])
def test_axvspan_epoch():
from datetime import datetime
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp