| 1040 | |
| 1041 | @image_comparison(['hexbin_empty.png'], remove_text=True, style='_classic_test') |
| 1042 | def test_hexbin_empty(): |
| 1043 | # From #3886: creating hexbin from empty dataset raises ValueError |
| 1044 | fig, ax = plt.subplots() |
| 1045 | ax.hexbin([], []) |
| 1046 | # From #23922: creating hexbin with log scaling from empty |
| 1047 | # dataset raises ValueError |
| 1048 | ax.hexbin([], [], bins='log') |
| 1049 | # From #27103: np.max errors when handed empty data |
| 1050 | ax.hexbin([], [], C=[], reduce_C_function=np.max) |
| 1051 | # No string-comparison warning from NumPy. |
| 1052 | ax.hexbin([], [], bins=np.arange(10)) |
| 1053 | |
| 1054 | |
| 1055 | def test_hexbin_pickable(): |