import matplotlib.pyplot as plt
import numpy as np
from matplotlib import patheffects

# plt.figure()
#
# ax = plt.gca()

y = np.random.random(9)

col_tables = ['col1','col2','col3']

row_tables = ['row1','row2','row3']

table_values = [[11,12,13],[21,22,23],[28,29,30]]

row_colors = ['red','green','blue']

my_table = plt.table(cellText=table_values,
                     colWidths=[0.1]*3,
                     rowLabels=row_tables,
                     colLabels=col_tables,
                     rowColours=row_colors,
                     loc = 'upper right')


plt.show()

上面代码可以制作出一个表格

python向图标添加表格

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2022-02-19
  • 2022-03-02
  • 2021-12-06
  • 2021-11-17
  • 2022-01-05
相关资源
相似解决方案