... | ... | @@ -21,9 +21,6 @@ axe.set_title(year,fontsize=fs_title,weight="bold") |
|
|
axe = fig.add_axes(subplot,projection=ccrs.PlateCarree())
|
|
|
im = axe.imshow(data,extent=[-17.5,-1,21,36],cmap=yelgre,vmin=v_min,vmax=v_max)
|
|
|
axe.text(-17,35,file_name+" _ "+str(year),fontsize = fs_textongraph,weight="bold",rotation="horizontal")
|
|
|
axe.coastlines('50m', linewidth=0.7,edgecolor='black')
|
|
|
axe.add_feature(cfeature.BORDERS,linewidth=0.4,edgecolor='black')
|
|
|
axe.add_feature(cfeature.RIVERS,linewidth=0.6,edgecolor="white")
|
|
|
axe.set_xticks(np.arange(-15,-1,4))
|
|
|
axe.set_yticks(np.arange(23,36,4))
|
|
|
axe.tick_params(labelsize=fs_label,length=4, direction ="inout")
|
... | ... | @@ -34,9 +31,6 @@ axe = fig.add_axes(subplot,projection=ccrs.PlateCarree()) |
|
|
im = axe.imshow(data,extent=[-17.5,-1,21,36],cmap=yelgre,vmin=v_min,vmax=v_max)
|
|
|
axe.text(-11,37,file_name+" _ "+str(year),fontsize = fs_textongraph,weight="bold",rotation="horizontal")
|
|
|
axe.axis([-12,-1,29,38])
|
|
|
axe.coastlines('50m', linewidth=0.7,edgecolor='black')
|
|
|
axe.add_feature(cfeature.BORDERS,linewidth=0.4,edgecolor='black')
|
|
|
axe.add_feature(cfeature.RIVERS,linewidth=0.6,edgecolor="white")
|
|
|
axe.set_xticks(np.arange(-12,-1,2))
|
|
|
axe.set_yticks(np.arange(29,38,2))
|
|
|
axe.tick_params(labelsize=fs_label,length=4, direction ="inout")
|
... | ... | @@ -45,13 +39,46 @@ axe.tick_params(labelsize=fs_label,length=4, direction ="inout") |
|
|
```
|
|
|
im = axe.imshow(data[id_months],extent=[-10.71,-1.0471998,28.619999,35.8671],cmap=whiblu)#,vmin=v_min,vmax=v_max)
|
|
|
axe.text(-10.5,35.5,"months {}".format(i),fontsize = fs_textongraph,weight="bold",rotation="horizontal")
|
|
|
axe.coastlines('50m', linewidth=0.7,edgecolor='black')
|
|
|
axe.add_feature(cfeature.BORDERS,linewidth=0.4,edgecolor='black')
|
|
|
axe.add_feature(cfeature.RIVERS,linewidth=0.6,edgecolor="white")
|
|
|
axe.set(xlim= (-11,-1), ylim=(27, 37))
|
|
|
axe.set_xticks(np.arange(-10,-1,2))
|
|
|
axe.set_yticks(np.arange(28,37,2))
|
|
|
axe.tick_params(labelsize=fs_label,length=4, direction ="inout")
|
|
|
```
|
|
|
## Morocco shapefile
|
|
|
```
|
|
|
def plot_region (axe):
|
|
|
region_sf = shp.Reader("/home/marie/nextCloud/Documents/lpjml5_maroc/python_toolbox/Maroc_Regions_Provinces/REGION.shp")
|
|
|
for shaperecord in region_sf.shapeRecords():
|
|
|
shape = shaperecord.shape
|
|
|
points = np.array(shape.points)
|
|
|
intervals = list(shape.parts) + [len(shape.points)]
|
|
|
for (k, l) in zip(intervals[:-1], intervals[1:]):
|
|
|
axe.plot(*zip(*points[k:l]),color ="#000000",linewidth=1)
|
|
|
return ()
|
|
|
|
|
|
def plot_morocco (axe):
|
|
|
morocco_sf = shp.Reader("/home/marie/nextCloud/Documents/lpjml5_maroc/python_toolbox/Maroc_Regions_Provinces/maroc_adm0.shp")
|
|
|
for shaperecord in morocco_sf.shapeRecords():
|
|
|
shape = shaperecord.shape
|
|
|
points = np.array(shape.points)
|
|
|
intervals = list(shape.parts) + [len(shape.points)]
|
|
|
for (k, l) in zip(intervals[:-1], intervals[1:]):
|
|
|
axe.plot(*zip(*points[k:l]),color ="#000000",linewidth=1)
|
|
|
return ()
|
|
|
|
|
|
def plot_province (axe):
|
|
|
province_sf = shp.Reader("/home/marie/nextCloud/Documents/lpjml5_maroc/python_toolbox/Maroc_Regions_Provinces/PROVINCE.shp")
|
|
|
for shape in province_sf.shapes():
|
|
|
points = np.array(shape.points)
|
|
|
intervals = list(shape.parts) + [len(shape.points)]
|
|
|
for (k, l) in zip(intervals[:-1], intervals[1:]):
|
|
|
axe.plot(*zip(*points[k:l]),color ="#000000",linewidth=1)
|
|
|
return ()
|
|
|
|
|
|
plot_morocco(axe)
|
|
|
plot_region(axe)
|
|
|
plot_province(axe)
|
|
|
|
|
|
```
|
|
|
## Brazil Map
|
|
|
```plaintext
|
... | ... | |