there is a matrix with numerical data (Index_Sver_total), you need to create a color scale on which a certain range of values is associated with each color. Specifically: green corresponds to the range 1-300, blue 301-1000, yellow 1001-4000, red 4001-10000, brown> 10001. That is, it should be similar to this: 
Code:
nllcrnrlat=53.871 nurcrnrlat=61.869 nllcrnrlon=72.9 nurcrnrlon=90 clevs = [0,300,1000,4000,10000] ax = plt.subplot ax = Basemap(projection='cyl',llcrnrlat=nllcrnrlat,urcrnrlat=nurcrnrlat,llcrnrlon=nllcrnrlon,urcrnrlon=nurcrnrlon,resolution='h') ax.drawparallels(np.arange(nllcrnrlat,nurcrnrlat,0.186),labels=[True,False,False,False]) ax.drawmeridians(np.arange(nllcrnrlon,nurcrnrlon,0.225),labels=[False,False,False,True]) cs = ax.contourf(lons,lats,Index_Sver_total,clevs) ax.colorbar(cs) plt.title('Index Sverlova') plt.show() Only it is necessary to make by means of imshow (without interpolation). At the moment it turned out like this:
Code:
nllcrnrlat=53.871 nurcrnrlat=61.869 nllcrnrlon=72.9 nurcrnrlon=90 clevs = [0,300,1000,4000,10000] ax = plt.subplot ax = Basemap(projection='cyl',llcrnrlat=nllcrnrlat,urcrnrlat=nurcrnrlat,llcrnrlon=nllcrnrlon,urcrnrlon=nurcrnrlon,resolution='h') ax.drawparallels(np.arange(nllcrnrlat,nurcrnrlat,0.186),labels=[True,False,False,False]) ax.drawmeridians(np.arange(nllcrnrlon,nurcrnrlon,0.225),labels=[False,False,False,True]) img = ax.imshow(Index_Sver_total,interpolation='none',cmap='jet') ax.colorbar(img) plt.title('Index Sverlova') plt.show() But this is not what is needed, because the values in the matrix change at each iteration, and, accordingly, each time the image is displayed, the values in the scale will jump, but the scale must be constant. It is necessary to build a scale similar to 1 picture. I read the matplotlib library documentation about imshow and colorbar, but without success. I would be grateful for your help.

plt.clim(low, upper). - Avernial