code: def _plot_inversion(f, rhs, r, k, imin, spacing, shift, cvar):
      r
  
      # Check matplotlib (soft dependency)
      if not plt:
          print(plt_msg)
          return
  
      plt.figure("Inversion result "+f.name, figsize=(9.5, 4))
      plt.subplots_adjust(wspace=.3, bottom=0.2)
      plt.clf()
  
      tk = np.logspace(np.log10(k.min()), np.log10(k.max()), r.size)
  
      plt.suptitle(f.name+'; Spacing ::'+str(spacing)+'; Shift ::'+str(shift))
  
      # Plot lhs
      plt.subplot(121)
      plt.title('|lhs|')
      if f.name == 'j2':
          lhs = f.lhs(tk)
          plt.loglog(tk, np.abs(lhs[0]), lw=2, label='Theoretical J0')
          plt.loglog(tk, np.abs(lhs[1]), lw=2, label='Theoretical J1')
      else:
          plt.loglog(tk, np.abs(f.lhs(tk)), lw=2, label='Theoretical')
      plt.xlabel('l')
      plt.legend(loc='best')
  
      # Plot rhs
      plt.subplot(122)
      plt.title('|rhs|')
  
      # Transform pair rhs
      plt.loglog(r, np.abs(f.rhs), lw=2, label='Theoretical')
  
      # Transform with filter
      plt.loglog(r, np.abs(rhs), '-.', lw=2, label='This filter')
  
      # Plot minimum amplitude or max r, respectively
      if cvar == 'amp':
          label = 'Min. Amp'
      else:
          label = 'Max. r'
      plt.loglog(r[imin], np.abs(rhs[imin]), 'go', label=label)
  
      plt.xlabel('r')
      plt.legend(loc='best')
      plt.gcf().canvas.draw()  # To force draw in notebook while running
      plt.show()
docs: r"""QC the resulting filter.