I solved it. It turns out that I create the figure with
h = imshow(newImg, 'Border', 'tight');
Trying to set the title won't work, so I need to remove the `Border` option.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!