Creating Tables using matplotlib

by: twod24, 7 years ago


Hello, I'm trying write code to create a table below a graph.
    the_table = plt.table(cellText=[1,2,3,4,5],rowLabels=rows, rowColours='C0', colLabels=columns,loc='bottom')

I'm getting some kind nasty error. I took it from this demo: https://matplotlib.org/examples/pylab_examples/table_demo.html
and modified it for my program but it's not working :(
ERROR:
  File "E:Pythonlibsite-packagesmatplotlibtable.py", line 568, in table
    cols = len(cellText[0])
TypeError: object of type 'int' has no len()



You must be logged in to post. Please login or register an account.