()
| 1064 | |
| 1065 | @image_comparison(['hexbin_log.png'], style='mpl20') |
| 1066 | def test_hexbin_log(): |
| 1067 | # Issue #1636 (and also test log scaled colorbar) |
| 1068 | |
| 1069 | np.random.seed(19680801) |
| 1070 | n = 100000 |
| 1071 | x = np.random.standard_normal(n) |
| 1072 | y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n) |
| 1073 | y = np.power(2, y * 0.5) |
| 1074 | |
| 1075 | fig, ax = plt.subplots() |
| 1076 | h = ax.hexbin(x, y, yscale='log', bins='log', |
| 1077 | marginals=True, reduce_C_function=np.sum) |
| 1078 | plt.colorbar(h) |
| 1079 | |
| 1080 | # Make sure offsets are set |
| 1081 | assert h.get_offsets().shape == (11558, 2) |
| 1082 | |
| 1083 | |
| 1084 | def test_hexbin_log_offsets(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…