From 6dd50b80dc5bb6b6c5dfd13ab5aa29b791a0744f Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Wed, 6 Mar 2019 09:57:48 +0100 Subject: [PATCH] DOC: fix random state in geoplot voronoi example to prevent random errors (#933) See ResidentMario/geoplot#69: depending on how the data are subsampled, we stumble into a potential bug in geoplot. So fixing the random state with a working one to prevent this. --- examples/plotting_with_geoplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/plotting_with_geoplot.py b/examples/plotting_with_geoplot.py index 6cb15dc..c1730ba 100644 --- a/examples/plotting_with_geoplot.py +++ b/examples/plotting_with_geoplot.py @@ -74,7 +74,7 @@ geoplot.polyplot(boroughs, ax=ax) # using Voronoi tessellation. ax = geoplot.voronoi( - injurious_collisions.sample(1000), + injurious_collisions.sample(1000, random_state=42), hue='NUMBER OF PERSONS INJURED', cmap='Reds', scheme='fisher_jenks', clip=boroughs.geometry, linewidth=0)