figure('color','k') image(val) axis off % Remove axis ticks and numbers axis image % Set aspect ratio to obtain square pixels