2015-01-15 4 views
3

나는 모든 명령과 찾을 수있는 문서를 시험해 보았습니다. 여기에 행의 높이를 어떻게 설정합니까?Matplotlib 행 높이 테이블 속성

from pylab import * 

# Create a figure 
fig1 = figure(1) 
ax1_1 = fig1.add_subplot(111) 

# Add a table with some numbers.... 

tab = [[1.0000, 3.14159], [1, 2], [2, 1]] 

# Format table numbers as string 
tab_2 = [['%.2f' % j for j in i] for i in tab] 

y_table = plt.table(cellText=tab_2,colLabels=['Col A','Col B'], colWidths = [.5]*2, loc='center') 
y_table.set_fontsize(34) 


show() 

답변

8

당신은 ytable.scale 사용할 수 있습니다

import matplotlib.pyplot as plt 

fig, ax = plt.subplots() 
tab = [[1.0000, 3.14159], [1, 2], [2, 1]] 
tab2 = [['%.2f' % j for j in i] for i in tab] 

ytable = plt.table(cellText=tab2, colLabels=['Col A','Col B'], 
        colWidths=[.5]*2, loc='center') 
ytable.set_fontsize(34) 
ytable.scale(1, 4) 
plt.show() 

수익률

enter image description here