code: def fit_plots(ax,xfit,xraw,yfit,yraw):
      '''
      #====================================================================
      plot the fitted results for data fit and refit
      #====================================================================
      '''
      global _yfits_
      _yfits_ = yfit
      ax.plot(xfit, yfit)
      ax.plot(xfit, np.sum(yfit,axis=1))
      ax.scatter(xraw, yraw)
      ax.set_xlabel('Field (log10(mT))')
      ax.set_ylabel('IRM normalization'f fit_plots(ax,xfit,xraw,yfit,yraw):
      '''
      #====================================================================
      plot the fitted results for data fit and refit
      #====================================================================
      '''
      global _yfits_
      _yfits_ = yfit
      ax.plot(xfit, yfit)
      ax.plot(xfit, np.sum(yfit,axis=1))
      ax.scatter(xraw, yraw)
      ax.set_xlabel('Field (log10(mT))')
      ax.set_ylabel('IRM normalization')
docs: #====================================================================
      plot the fitted results for data fit and refit
      #====================================================================