Adjusting the homogeneity of the magnetic field is called shimming. This is achieved with additional electromagnets (shims) that are located around the sample. The better the shimming, the sharper the peaks.