So, after searching for a few hours, I can't seem to find a simple answer to my issue. I have a filled contour plot (contourf) for whom I want the values displayed on the colorbar to be between -45 and 45.
fig, ax = plt.subplots()
plt.contourf(time_array, f, half_CP, 30, cmap=cm.seismic, vmin=-45, vmax=45)
cb = plt.colorbar()
plt.clim(-45,45)
clim has successfully compressed the range of colors displayed in my colorbar, however my colorbar is still displaying values from around -80 to 80... in other words, my vmin/vmax isn't working. I've tried putting this argument in the plt.colorbar line, however that has had no effect either.
I would not be surprised if it's something super-simple, but I've been trying to find the error/mistake/what I'm missing for a few hours now. I would appreciate any help!