code: def plot_mean_field_conv(N=1, n=0.5, Uspan=np.arange(0, 3.6, 0.5)):
      
  
      sl = Spinon(slaves=2*N, orbitals=N, avg_particles=2*n,
                         hopping=[0.5]*2*N, orbital_e=[0]*2*N)
      hlog = solve_loop(sl, Uspan, [0.])[1]
  
      f, (ax1, ax2) = plt.subplots(2, sharex=True)
      for field in hlog:
          field = np.asarray(field)
          ax1.semilogy(abs(field[1:]-field[:-1]))
          ax2.plot(field)#, label = 'h, U = {}'.format(Uint))
  
      plt.title('Convergence of selfconsintent mean field')
      ax1.set_ylabel('$\\Delta h$')
      ax2.set_ylabel('mean field $h$')
      plt.xlabel('iterations')
  
      return hlog
docs: Generates the plot on the convergenge of the mean field in single
         site spin hamiltonian under with N degenerate half-filled orbitals