我希望列标题的字体比单元格中的值小,这样它们就可读(我将在附加的jpeg中显示我的意思)。现在所有东西的字体大小都一样。在
表格代码示例:fig = plt.figure(figsize=(11, 8.27))
ax = fig.add_subplot(111)
ax.axis('off')
index_length = len(well_data_table.index)
table_1 = well_data_table.iloc[0:30]
table_2= well_data_table.iloc[30:60]
table_3 = well_data_table.iloc[60:-1]
q='lightsalmon'
colors3 = [q,q,q,q,q,q,q,q,q,q,q]
the_table1 = ax.table(cellText=table_1.values, colWidths =
[.1]*len(table_1.columns),
rowLabels=table_1.index,
colColours = colors3,
colLabels=table_1.columns,
cellLoc = 'center', rowLoc = 'center',
loc='bottom',
bbox=[.1, 0, 1, 1])
the_table1.auto_set_font_size(False)
the_table1.set_fontsize(8)
the_table1.scale(1, 1)
ax.title.set_text("""TEST""")
pdf.savefig(facecolor='w')