Closed
Description
fig, axs = plt.subplots(1, 2, figsize=(6, 3))
ax1, ax2 = axs
ax1.axis('off')
ax2.axis('off')
# Table1 use auto_set_column_width
tb1 = ax1.table(cellText=[['Long Text', 2],['Long Long text', 1]],
rowLabels=["A","B"],
colLabels=["Col1","Col2"],
loc="center")
tb1.auto_set_font_size(False)
tb1.set_fontsize(12)
tb1.auto_set_column_width(["Col1","Col2"]) # NOT WORKING
tb1.auto_set_column_width([-1,0,1]) # NOT WORKING
# Table 2 use _autoColumns
tb2 = ax2.table(cellText=[['Long Text', 2],['Long Long text', 1]],
rowLabels=["A","B"],
colLabels=["Col1","Col2"],
loc="center")
tb2.auto_set_font_size(False)
tb2.set_fontsize(12)
tb2._autoColumns = [-1,0,1]
Matplotlib 1.5.0