File tree 1 file changed +23
-0
lines changed
Filter options
1 file changed +23
-0
lines changed
Original file line number Diff line number Diff line change @@ -427,3 +427,26 @@ def test_cursor_precision():
427
427
assert ax .format_coord (2 , 0 ) == "θ=0.6π (115°), r=0.000"
428
428
assert ax .format_coord (2 , .1 ) == "θ=0.64π (115°), r=0.100"
429
429
assert ax .format_coord (2 , 1 ) == "θ=0.637π (114.6°), r=1.000"
430
+
431
+ @check_figures_equal (extensions = ["png" ])
432
+ def test_polar_lim_draw (fig_test , fig_ref ):
433
+ """
434
+ Check that lines on polar axes are correctly transformed after
435
+ a draw and an axes limit change.
436
+
437
+ """
438
+ # A quarter arc at r=5
439
+ theta = np .linspace (0 , np .pi / 2 , 90 )
440
+ r = np .full (90 , 5 )
441
+
442
+ ax_ref = fig_ref .add_subplot (projection = 'polar' )
443
+ ax_ref .set_ylim (0 , 10 )
444
+ ax_ref .plot (theta , r )
445
+
446
+ ax_test = fig_test .add_subplot (projection = 'polar' )
447
+ ax_test .set_ylim (4 , 10 )
448
+
449
+ ax_test .plot (theta , r )
450
+ fig_test .canvas .draw ()
451
+
452
+ ax_test .set_ylim (0 , 10 )
You can’t perform that action at this time.
0 commit comments