is there a nice way similar to “matrix display” that could show also text.
Splitting up the list below into 5 panels isn’t a fancy way of showing results.
Preferably without using third-party plugins like Human.
l = ['detail', 'Orginal Area', 'New Area', 'Area difference', 'distance', 0.0, 858922.282672682, 858923.8709535187, '0.0%', 2.5139757993742657, 1.0, 474914.8516458379, 474913.53620281606, '-0.0%', 65.99713493501264, 2.0, 446538.48334372113, 446597.82309198694, '0.0%', 8.090157128402202]
nested_list = list(zip(*[iter(l)]*5))
widths = [len(x) for x in nested_list[0]]
s = ' | '.join(x for x in nested_list[0]) + '\n'
for row in nested_list[1:]:
s += ', '.join('%{}.{}s'.format(width,width) % x for (x, width) in zip(row, widths))
s += '\n'
print(s)
gives:
detail | Orginal Area | New Area | Area difference | distance
0.0, 858922.28267, 858923.8, 0.0%, 2.513975
1.0, 474914.85164, 474913.5, -0.0%, 65.99713
2.0, 446538.48334, 446597.8, 0.0%, 8.090157
@zahra_mahmoudi Are you using python3 in Rhino 8 and is tabulate installed in your Rhino 8 python3 installation? Did you add the r: tabulate line at the top of your script?
Nice. It is possible to add an additional input for data to be displayed? Also would be great if the with of the columns can be variable, using the maximum with of the data in each individual column instead of using the biggest width, in this case looks like all the columns are using the width of the Area difference column.