You just need to make sure the ticks you would like is within the range:
using PyPlot 
data = pi*rand(10, 10)
imshow(data,vmin=0, vmax=pi)
cbar = colorbar(ticks=[0, pi])

Reply via email to