MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_hexbin_log_offsets

Function test_hexbin_log_offsets

lib/matplotlib/tests/test_axes.py:1084–1099  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1082
1083
1084def test_hexbin_log_offsets():
1085 x = np.geomspace(1, 100, 500)
1086
1087 fig, ax = plt.subplots()
1088 h = ax.hexbin(x, x, xscale='log', yscale='log', gridsize=2)
1089 np.testing.assert_almost_equal(
1090 h.get_offsets(),
1091 np.array(
1092 [[0, 0],
1093 [0, 2],
1094 [1, 0],
1095 [1, 2],
1096 [2, 0],
1097 [2, 2],
1098 [0.5, 1],
1099 [1.5, 1]]))
1100
1101
1102@image_comparison(["hexbin_linear.png"], style="mpl20", remove_text=True)

Callers

nothing calls this directly

Calls 4

hexbinMethod · 0.80
assert_almost_equalMethod · 0.80
get_offsetsMethod · 0.80
subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…