code: def plot_compare_table(image_list, method_list, color_list, compare_dict, fig_name="", fig_num=111):
      
      row_labels = image_list
      # 写入值：
      table_vals = []
      for i in range(len(row_labels)):
          row_vals = []
          for method in method_list:
              row_vals.append(compare_dict[method][i])
          table_vals.append(row_vals)
      # 绘制表格图
      colors = [[(0.95, 0.95, 0.95) for c in range(len(method_list))] for r in range(len(row_labels))]  # cell的颜色
      # plt.figure(figsize=(8, 4), dpi=120)
      plt.subplot(fig_num)
      plt.title(fig_name)  # 绘制标题
      lightgrn = (0.5, 0.8, 0.5)  # 这个是label的背景色
      plt.table(cellText=table_vals,
                rowLabels=row_labels,
                colLabels=method_list,
                rowColours=[lightgrn] * len(row_labels),
                colColours=color_list,
                cellColours=colors,
                cellLoc='center',
                loc='upper left')
  
      plt.axis('off')
docs: 绘制了对比表格.