1

I'm trying to plot a voronoi plot over a map, to see the voronoi areas over the map.

I have read the next post of other user, but I'm not able of achieve a similar result: Image and Voronoi diagram on the same figure

I have the following map with points:

enter image description here

Points are made with coords and the same with the overall map.

This is the map without the points: enter image description here

And here is the voronoi_plot:

enter image description here

This was made with this code:

from scipy.spatial import Voronoi, voronoi_plot_2d
vor = Voronoi(coords)
voronoi_plot_2d(vor)

So when I try to put both the map and voronoi in the same plot with the next code:

fig = plt.figure(figsize=(20,20))
ax = fig.add_subplot(111)
valdevevas.plot(ax=ax,color='white', edgecolor='grey')
voronoi_plot_2d(vor, point_size=10, line_colors='red', ax=ax)
plt.show()

It looks like this:

enter image description here

It has the map, but it's only the voronoi "part" of the map.

I'd like to achieve the complete map with the voronoi areas over it.

Is it posible the way I'm doing or should I try other way?

Thanks

alex91
  • 35
  • 4

0 Answers0