I am trying to edit the colorbar range on my contour graph from 0 to 0.12, I have tried a few things but it hasn't worked. I keep getting the full color bar range up until 0.3 which is not what I want.
This is my code:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.tri as tri
triang = tri.Triangulation(x, y)
plt.tricontour(x, y, z, 15, colors='k')
plt.tricontourf(x, y, z, 15, cmap='Blues', vmin=0, vmax=0.12,\
extend ='both')
plt.colorbar()
plt.clim(0,0.12)
plt.ylim …Run Code Online (Sandbox Code Playgroud)