我试图在matplotlib中绘制一些表格,但是对于supblot,在这种情况下,表格高度太小,如何用表格填充较低的supblot
问题:第二行表格子批次高度太小,如何增加其高度
import numpy as np
import matplotlib.pyplot as plt
fig,ax = plt.subplots(2,1,figsize=(24,28))
# buy
ax[0].bar([1,2,3,4,5],[100,200,300,400,500])
ax[0].tick_params(axis='both', which='major', labelsize=18)
# table
colors = list('rrrbb')
ax[1].table(cellText=list('abcde'),
rowLabels=list('abcde'),
loc='center',
rowColours=colors,
cellColours=np.array(colors).reshape(-1,1))
比额表(1,4)
比例(1,1)
相关问题 更多 >
编程相关推荐