Is there a way to set a min-width or in general width value to the row label cells (r1, r2) in the following code?
Using set_width does not seem to have any effect.
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import textwrap as twp
import sys
import json
import matplotlib as mpl
fig, ax = plt.subplots();
the_table = plt.table(cellText=['c1','c2'],
rowLabels=['r1','r2'],
bbox=[0, -0.5, 1, 0.5],
colLabels= ['col1', 'col2'],
loc='bottom')
table_props=the_table.properties()
table_cells=the_table.get_celld()
for cell in table_cells:
print(cell)
if cell[1] == -1:
the_table[cell].set_width(3) Using set_width does not seem to have any effect.
buran write Jun-10-2023, 06:35 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
