()
| 7545 | |
| 7546 | @mpl.style.context('default') |
| 7547 | def test_axes_margins(): |
| 7548 | fig, ax = plt.subplots() |
| 7549 | ax.plot([0, 1, 2, 3]) |
| 7550 | assert ax.get_ybound()[0] != 0 |
| 7551 | |
| 7552 | fig, ax = plt.subplots() |
| 7553 | ax.bar([0, 1, 2, 3], [1, 1, 1, 1]) |
| 7554 | assert ax.get_ybound()[0] == 0 |
| 7555 | |
| 7556 | fig, ax = plt.subplots() |
| 7557 | ax.barh([0, 1, 2, 3], [1, 1, 1, 1]) |
| 7558 | assert ax.get_xbound()[0] == 0 |
| 7559 | |
| 7560 | fig, ax = plt.subplots() |
| 7561 | ax.pcolor(np.zeros((10, 10))) |
| 7562 | assert ax.get_xbound() == (0, 10) |
| 7563 | assert ax.get_ybound() == (0, 10) |
| 7564 | |
| 7565 | fig, ax = plt.subplots() |
| 7566 | ax.pcolorfast(np.zeros((10, 10))) |
| 7567 | assert ax.get_xbound() == (0, 10) |
| 7568 | assert ax.get_ybound() == (0, 10) |
| 7569 | |
| 7570 | fig, ax = plt.subplots() |
| 7571 | ax.hist(np.arange(10)) |
| 7572 | assert ax.get_ybound()[0] == 0 |
| 7573 | |
| 7574 | fig, ax = plt.subplots() |
| 7575 | ax.imshow(np.zeros((10, 10))) |
| 7576 | assert ax.get_xbound() == (-0.5, 9.5) |
| 7577 | assert ax.get_ybound() == (-0.5, 9.5) |
| 7578 | |
| 7579 | |
| 7580 | @pytest.fixture(params=['x', 'y']) |
nothing calls this directly
no test coverage detected
searching dependent graphs…