()
| 7325 | |
| 7326 | |
| 7327 | def test_square_plot(): |
| 7328 | x = np.arange(4) |
| 7329 | y = np.array([1., 3., 5., 7.]) |
| 7330 | fig, ax = plt.subplots() |
| 7331 | ax.plot(x, y, 'mo') |
| 7332 | ax.axis('square') |
| 7333 | xlim, ylim = ax.get_xlim(), ax.get_ylim() |
| 7334 | assert np.diff(xlim) == np.diff(ylim) |
| 7335 | assert ax.get_aspect() == 1 |
| 7336 | assert_array_almost_equal( |
| 7337 | ax.get_position(original=True).extents, (0.125, 0.1, 0.9, 0.9)) |
| 7338 | assert_array_almost_equal( |
| 7339 | ax.get_position(original=False).extents, (0.2125, 0.1, 0.8125, 0.9)) |
| 7340 | |
| 7341 | |
| 7342 | def test_bad_plot_args(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…