Experiments dedicated to the measurement of the electric dipole moment of the neutron require outstanding control of the magnetic field uniformity. The neutron electric dipole moment (nEDM) experiment at the Paul Scherrer Institute uses a 199Hg co-magnetometer to precisely monitor magnetic field variations. This co-magnetometer, in the presence of field non-uniformity, is responsible for the largest systematic effect of this measurement. To evaluate and correct that effect, offline measurements of the field non-uniformity were performed during mapping campaigns in 2013, 2014 and 2017. We present the results of these campaigns, and the improvement the correction of this effect brings to the neutron electric dipole moment measurement.