()
| 41 | |
| 42 | @image_comparison(['clipping_diamond'], remove_text=True, style='_classic_test') |
| 43 | def test_diamond(): |
| 44 | x = np.array([0.0, 1.0, 0.0, -1.0, 0.0]) |
| 45 | y = np.array([1.0, 0.0, -1.0, 0.0, 1.0]) |
| 46 | |
| 47 | fig, ax = plt.subplots() |
| 48 | ax.plot(x, y) |
| 49 | ax.set_xlim(-0.6, 0.6) |
| 50 | ax.set_ylim(-0.6, 0.6) |
| 51 | |
| 52 | |
| 53 | def test_clipping_out_of_bounds(): |