dic, data = ng.pipe.read('mg1_2d.fid')
uc_31P = ng.pipe.make_uc(dic, data, dim=1)
ppm_31P = uc_31P.ppm_scale()
ppm_31P_0, ppm_31P_1 = uc_31P.ppm_limits()
uc_1H = ng.pipe.make_uc(dic, data, dim=0)
ppm_1H = uc_1H.ppm_scale()
ppm_1H_0, ppm_1H_1 = uc_1H.ppm_limits()
fig = plt.figure()
ax = fig.add_subplot(111)
cmap = matplotlib.cm.Blues_r
contour_start = 160000
contour_num = 30
contour_factor = 1.6
cl = contour_start * contour_factor ** np.arange(contour_num)
ax.contour(data, cl, cmap=cmap, extent=(ppm_31P_0, ppm_31P_1, ppm_1H_0, ppm_1H_1))
ax.set_xlim(100, 20)
ax.set_ylim(18, -2)