Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 907067a

Browse files
committed
TST: add test for rlim
1 parent fd68836 commit 907067a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,27 @@ def test_polar_theta_limits():
794794
ax.yaxis.set_tick_params(label2On=True, rotation='auto')
795795

796796

797+
@check_figures_equal(extensions=["png"])
798+
def test_polar_rlim(fig_test, fig_ref):
799+
ax = fig_test.subplots(subplot_kw={'polar': True})
800+
ax.set_rlim(top=10)
801+
ax.set_rlim(bottom=.5)
802+
803+
ax = fig_ref.subplots(subplot_kw={'polar': True})
804+
ax.set_rmax(10.)
805+
ax.set_rmin(.5)
806+
807+
808+
@check_figures_equal(extensions=["png"])
809+
def test_polar_rlim_bottom(fig_test, fig_ref):
810+
ax = fig_test.subplots(subplot_kw={'polar': True})
811+
ax.set_rlim(bottom=[.5, 10])
812+
813+
ax = fig_ref.subplots(subplot_kw={'polar': True})
814+
ax.set_rmax(10.)
815+
ax.set_rmin(.5)
816+
817+
797818
@image_comparison(baseline_images=['axvspan_epoch'])
798819
def test_axvspan_epoch():
799820
from datetime import datetime

0 commit comments

Comments
 (0)