Matplotlib Basemap tutorial 04 : using inside_poly() to select data !

# remember to define the ax instance : ax = plt.subplot(111) zone = “Roetgen – Monschau” x,y = m(6.15,50.41) x2,y2 = m(6.59,50.67) x3,y3 = m(6.34,50.855) x4,y4 = m(5.83,50.65) data = np.array(([x,x2,x3,x4], [y,y2,y3,y4])) p = Polygon(data.T,edgecolor=’red’,linewidth=1.5,facecolor=’none’) ax.add_artist(p) Note that we have…

Matplotlib Basemap tutorial 01 : Your first map

# # BaseMap example by geophysique.be # tutorial 01 from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import numpy as np fig = plt.figure(figsize=(11.7,8.3)) #Custom adjust of the subplots plt.subplots_adjust(left=0.05,right=0.95,top=0.90,bottom=0.05,wspace=0.15,hspace=0.05) ax = plt.subplot(111) #Let’s create a basemap around Belgium m…