我对 python/Matplotlib 比较陌生。我正在尝试弄清楚如何控制表格单元格中显示的小数位数。
例如; 这是一个创建表格的代码块..但我希望每个单元格中的数据只显示到小数点后两位..
from pylab import *
# Create a figure
fig1 = figure(1)
ax1_1 = fig1.add_subplot(111)
# Add a table with some numbers....
the_table = table(cellText=[[1.0000, 3.14159], [sqrt(2), log(10.0)], [exp(1.0), 123.4]],colLabels=['Col A','Col B'],loc='center')
show()