Matplotlib- How to make color fill bias towards max & min values?
<p><strong>The issue</strong></p>

<p>I have a plot of correlation of two variables with most of the values close to either -1 or 1. I'm using a seismic colormap (red &amp; blue w/ white in the middle), but most of the plot is either dark blue (close to -1) or dark red (close to 1), showing little detail near min &amp; max values.</p>

<p><strong>The code</strong></p>

<p>Here's the code block I used for plotting.</p>

<pre><code>#Set variables
lonlabels = ['0','45E','90E','135E','180','135W','90W','45W','0']
latlabels = ['90S','60S','30S','Eq.','30N','60N','90N']
bounds = np.array([-1.0,-0.8,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,0.8,1.0])

#Create basemap
fig,ax = plt.subplots(figsize=(15.,10.))
m = Basemap(projection='cyl',llcrnrlat=-90,urcrnrlat=90,llcrnrlon=0,urcrnrlon=360.,lon_0=180.,resolution='c')
m.drawcoastlines(linewidth=1,color='w')
m.drawcountries(linewidth=1,color='w')
m.drawparallels(np.arange(-90,90,30.),linewidth=0.3)
m.drawmeridians(np.arange(-180.,180.,45.),linewidth=0.3)   
meshlon,meshlat = np.meshgrid(lon,lat)
x,y = m(meshlon,meshlat)

#Plot variable
corre = m.pcolormesh(x,y,corrcoef,cmap='seismic', shading='gouraud',vmin=-1.0,vmax=1.0)

#Set titles &amp; labels
#Colorbar
cbar = m.colorbar(corre,size="8%",ticks=bounds,location='bottom',pad=0.8)
cbar.set_label(label='Correlation Coefficient',size=25)
cbar.set_ticklabels(bounds)
for t in cbar.ax.get_xticklabels():
     t.set_fontsize(25)
#Titles
fig.suptitle('Correlation of Local Precipitation to Global (CanESM2)',fontsize=30,x=0.51,y=0.92)
ax.set_xlabel('Longitude',fontsize=25)
ax.set_xticks(np.arange(0,  405,45))
ax.set_xticklabels(lonlabels,fontsize=20)
ax.set_ylabel('Latitude', fontsize=25)
ax.set_yticks(np.arange(-90,120,30))
ax.set_yticklabels(latlabels,fontsize=20)
</code></pre>

<p>And here's the plot it generates.</p>

<p><a href="http://i.stack.imgur.com/bWkw8.png" rel="nofollow"><img src="http://i.stack.imgur.com/bWkw8.png" alt="enter image description here"></a></p>

<p><strong>The Question</strong></p>

<p>I'd like to adjust the color fill scheme so the middle portion of the colormap, say the -0.9 to 0.9 range, is compacted (almost like a break but not quite) and the color fill better defines the values at the ends. How can I do that? Like a symmetric logarithmic distribution, but biased towards the max &amp; min instead of the middle value.</p>

<p>There is a keyword argument <strong>norm</strong> that you can use with <strong>pcolormesh</strong> in order to change the scale of the color mapping. Take a look at the <a href="http://matplotlib.org/devdocs/users/colormapnorms.html#symmetric-logarithmic" rel="nofollow">matplotlib documentation</a> for this. And then you can use the parameter <strong>linthresh</strong> to change the middle range.
I haven't tried it but I think it might solve your problem.</p>

python matplotlib colors colormap