Table with multi-line/column header

asked 2020-05-02 10:11:32 -0500

Cyrille gravatar image

This is a nice table

T = [[0,0,5,3],[3,1,5,4],[4,4,6,2],[4,2,7,8],[5,4,6,6],[7,5,8,9]]
t = table(T, header_row=[r'$B_1$',r'$B_2$',r'$B_3$',r'$B_4$'], header_column=[r'$A_{11}$', r'$A_{12}$',r'$A_{13}$', r'$A_{21}$', r'$A_{22}$',r'$A_{23}$'], frame=True)
show(t)

But in the doc I havent seen how to add a multicolumn or multirow header for all the index or only for a subset

edit retag flag offensive close merge delete

Comments

Could you please provide an (visual) example of what you want to achieve ?

tmonteil gravatar imagetmonteil ( 2020-05-02 11:41:50 -0500 )edit

Also, can you point at the documentation page that might need improving?

slelievre gravatar imageslelievre ( 2020-05-03 14:27:18 -0500 )edit

Sorry, to answer this point late. I have just seen for what you were asking. Here is a table. I coul d also provide the Latex formula but it needs some additional packages

                              tatata

                     B1    B2   B3   B4

 t             A1  32    56    33   56

 o            A2  45    75    78   43

 t            A3  45    25    38   22

 o            A4  43    76    90   16

It would be nice also if some cells could be colored.

Here is the documentation page http://doc.sagemath.org/html/en/refer...

Cyrille gravatar imageCyrille ( 2020-05-04 01:12:32 -0500 )edit