Skip to content

Instantly share code, notes, and snippets.

@shreyagupta30
Last active October 31, 2020 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shreyagupta30/fc35858b1347c23eb68ecca5308f5897 to your computer and use it in GitHub Desktop.
Save shreyagupta30/fc35858b1347c23eb68ecca5308f5897 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy.io.shapereader import Reader
from cartopy.feature import ShapelyFeature
fig = plt.figure(figsize=(9,11))
ax = plt.axes(projection=ccrs.PlateCarree())
ax.set_extent([68.04999,97.95001, 5.5, 37.45], ccrs.PlateCarree())
#Overlaying of administrative boundries
filename = r'./India-States.shp'
shape_feature = ShapelyFeature(Reader(filename).geometries(),ccrs.PlateCarree(),
linewidth = 1, facecolor = 'none',
edgecolor = 'black')
ax.add_feature(shape_feature)
ax.add_feature(cfeature.OCEAN)
ax.add_feature(cfeature.LAND,edgecolor='black')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment