9951 explained code solutions for 126 technologies

python-matplotlibHow to change table column width

import matplotlib.pyplot as plt

data = [[1, 2, 3, 4, 5],

plt.table(data, loc='center', colWidths=[.2,.1,.1,.1,.1])

plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

data =

data to use for table cells


plot a table from specified data


position table in the middle of the chart area


set width of columns based on the list of given values (relative to the chart area, where 1 is 100% of chart area)


set first column width to 20% of chart area


set other columns width to 10% of chart area