How can I plot on a colorbar?
If for example I create a colorbar that range from 0,1 and I want to mark a with a red line the values 0.3 and 0.8 , how can I do it?
Thanks,
Actually I managed to find the answer
from matplotlib.pyplot import imshow, colorbar
data = [[0.0,0.2],[0.5,1.0]]
imshow(data)
cb = colorbar()
cb.ax.plot([0,1],[cb.norm(0.3),cb.norm(0.3)],'r')
cb.ax.plot([0,1],[cb.norm(0.8),cb.norm(0.8)],'r')