fig = plt . figure ( figsize = ( 15 , 15 ), dpi = 100 ) ax = fig . add_axes ([ 0.1 , 0.1 , 0.8 , 0.8 ]) m . drawcoastlines ( color = 'white' ) m . drawcountries ( color = 'white' ) m . fillcontinents ( color = "0.8" ) #for a in airport_data: # if minlon < float(a['lon']) < maxlon and minlat < float(a['lat']) < maxlat: # x, y = m(float(a['lon']), float(a['lat'])) # ax.text(x, y, a['id1']) ax . plot ( xy [:, 0 ], xy [:, 1 ], 'ko' , ms = 1.5 ) for simplex in vor . ridge_vertices : simplex = np . asarray ( simplex ) if np . all ( simplex >= 0 ): ax . plot ( vor . vertices [ simplex , 0 ], vor . vertices [ simplex , 1 ], '-' , color = 'darkred' ) center = xy . mean ( axis = 0 ) for pointidx , simplex in zip ( vor . ridge_points , vor . ridge_vertices ): simplex = np . asarray ( simplex ) if np . any ( simplex < 0 ): i = simplex [ simplex >= 0 ][ 0 ] t = xy [ pointidx [ 1 ]] - xy [ pointidx [ 0 ]] t /= np . linalg . norm ( t ) n = np . array ([ - t [ 1 ], t [ 0 ]]) midpoint = xy [ pointidx ] . mean ( axis = 0 ) far_point = vor . vertices [ i ] + np . sign ( np . dot ( midpoint - center , n )) * n * 10000000 ax . plot ([ vor . vertices [ i , 0 ], far_point [ 0 ]], [ vor . vertices [ i , 1 ], far_point [ 1 ]], '--' , color = 'darkred' ) ax . text ( 0.99 , 0.01 , 'data from OpenFlights.org' , horizontalalignment = 'right' , verticalalignment = 'bottom' , transform = ax . transAxes ) plt . show ()