![]() that very much depends on the extent of your data (since usually you don't want to distort the plot, the only option is to increase the plot-extent or use another projection) ![]() In order to add a colorbar for each individual subplot, you'd need to specify the axis on which to draw the colorbarĬoncerning the vertical size. I can't execute your code due to lack of data so here's a general example on how you could do it (using an explicit GridSpec instead of plt.subplots: ![]() # Add colorbar at specific indices (specific 3,4,5)Ĭbar_ticks = np.arange(224, 320, 15) # min and max values of the colorbarĮxtendrect=True,ticks=cbar_ticks,label="Air Temperature") # ticks=cbar_ticksĮxtendrect=True,ticks=cbar_ticks,label="Air Temperature") Gl.xlocator = mticker.FixedLocator(np.arange(-180, 180, 25)) Gl.ylocator = mticker.FixedLocator(np.arange(-90,90,20)) Gl = ax.gridlines(crs=proj, linewidth=1, color='black', alpha=0.2, linestyle="-") Temp=(ax=ax,transform=proj,cmap="magma",vmax=300,vmin=220, add_colorbar=False) Mzip=zip(air,)Īx.add_feature(cfeature.BORDERS, facecolor="green") Proj = ccrs.PlateCarree() #ccrs.Orthographic()įig,axes = plt.subplots(ncols=3,nrows=2,figsize=(20,7), import matplotlib.pyplot as pltĭs=xr.tutorial.load_dataset("air_temperature")Īir= Also making colorbar at each specific subplots. I try to make subplot maps with Cartopy using data from xarray tutorial and increase each map in vertical size, but failed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |