()
| 556 | |
| 557 | |
| 558 | def test_radial_limits_behavior(): |
| 559 | # r=0 is kept as limit if positive data and ticks are used |
| 560 | # negative ticks or data result in negative limits |
| 561 | fig = plt.figure() |
| 562 | ax = fig.add_subplot(projection='polar') |
| 563 | assert ax.get_ylim() == (0, 1) |
| 564 | # upper limit is expanded to include the ticks, but lower limit stays at 0 |
| 565 | ax.set_rticks([1, 2, 3, 4]) |
| 566 | assert ax.get_ylim() == (0, 4) |
| 567 | # upper limit is autoscaled to data, but lower limit limit stays 0 |
| 568 | ax.plot([1, 2], [1, 2]) |
| 569 | assert ax.get_ylim() == (0, 2) |
| 570 | # negative ticks also expand the negative limit |
| 571 | ax.set_rticks([-1, 0, 1, 2]) |
| 572 | assert ax.get_ylim() == (-1, 2) |
| 573 | # negative data also autoscales to negative limits |
| 574 | ax.plot([1, 2], [-1, -2]) |
| 575 | assert ax.get_ylim() == (-2, 2) |
| 576 | |
| 577 | |
| 578 | def test_radial_locator_wrapping(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…