| 1003 | @image_comparison(['hexbin_extent.png', 'hexbin_extent.png'], remove_text=True, |
| 1004 | style='_classic_test') |
| 1005 | def test_hexbin_extent(): |
| 1006 | # this test exposes sf bug 2856228 |
| 1007 | fig, ax = plt.subplots() |
| 1008 | data = (np.arange(2000) / 2000).reshape((2, 1000)) |
| 1009 | x, y = data |
| 1010 | |
| 1011 | ax.hexbin(x, y, extent=[.1, .3, .6, .7]) |
| 1012 | |
| 1013 | # Reuse testcase from above for a labeled data test |
| 1014 | data = {"x": x, "y": y} |
| 1015 | |
| 1016 | fig, ax = plt.subplots() |
| 1017 | ax.hexbin("x", "y", extent=[.1, .3, .6, .7], data=data) |
| 1018 | |
| 1019 | |
| 1020 | def test_hexbin_bad_extents(): |