From a38be52c57b7adca3f877533c25f004a07991f3d Mon Sep 17 00:00:00 2001 From: Ruth Comer <10599679+rcomer@users.noreply.github.com> Date: Tue, 2 Jan 2024 10:58:18 +0000 Subject: [PATCH] hexbin linear --- lib/matplotlib/tests/test_axes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index d8d7cb0144f1..47f2982ff7aa 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -1008,10 +1008,10 @@ def test_hexbin_log(): @image_comparison(["hexbin_linear.png"], style="mpl20", remove_text=True) def test_hexbin_linear(): # Issue #21165 - np.random.seed(19680801) + rng = np.random.default_rng(seed=19680801) n = 100000 - x = np.random.standard_normal(n) - y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n) + x = rng.standard_normal(n) + y = 2.0 + 3.0 * x + 4.0 * rng.standard_normal(n) fig, ax = plt.subplots() ax.hexbin(x, y, gridsize=(10, 5), marginals=True,