diff --git a/galleries/plot_types/basic/scatter_plot.py b/galleries/plot_types/basic/scatter_plot.py index 792016c0e79c..c6b9439a646e 100644 --- a/galleries/plot_types/basic/scatter_plot.py +++ b/galleries/plot_types/basic/scatter_plot.py @@ -11,12 +11,13 @@ plt.style.use('_mpl-gallery') # make the data -np.random.seed(3) -x = 4 + np.random.normal(0, 2, 24) -y = 4 + np.random.normal(0, 2, len(x)) +rng = np.random.default_rng(seed=None) + +x = 4 + rng.normal(0, 2, 24) +y = 4 + rng.normal(0, 2, len(x)) # size and color: -sizes = np.random.uniform(15, 80, len(x)) -colors = np.random.uniform(15, 80, len(x)) +sizes = rng.uniform(15, 80, len(x)) +colors = rng.uniform(15, 80, len(x)) # plot fig, ax = plt.subplots()