Jose, 1. Your question would be better addressed on the matplotlib mailing list 2. Try to add the vmin=0 and vmax=1 optional parameters to imshow >>> imshow(H,cmap=cm.gray,vmin=0,vmax=1) That way, the limits are properly taken into account