Last active
June 11, 2020 11:36
-
-
Save abhishekmamdapure/f1a17fe61b09ea0503000ce64fedb7fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lon, lat = np.meshgrid(long,lats) #this converts coordinates into 2D arrray | |
x,y = mp(lon,lat) #mapping them together | |
plt.figure(figsize=(6,8)) #figure size | |
c_scheme = mp.pcolor(x,y,np.squeeze(tave[0,:,:]),cmap = 'jet') # [0,:,:] is for the first day of the year | |
# consider this as the outline for the map that is to be created | |
mp.drawcoastlines() | |
mp.drawstates() | |
mp.drawcountries() | |
cbar = mp.colorbar(c_scheme,location='right',pad = '10%') # map information | |
plt.title('Average Temperature for: Day 1 of year 2019') | |
plt.show() | |
plt.savefig('tave.jpg',dpi=300) #saves the image generated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment