TransWikia.com

Placing a central header in each row in a GraphicsGrid

Mathematica Asked on January 27, 2021

Suppose I have a GraphicsGrid with the following format:

GraphicsGrid[{{Subscript[chart, 1, 1], Subscript[chart, 1, 2]}, {Subscript[chart, 2, 1], Subscript[chart, 2, 2]}, {Subscript[chart, 3, 1], Subscript[chart, 3, 2]}}]

In my grid, each row concerns the same type of information, and I would like to add a centralized heading to each of the three rows. How would I achieve that?

One Answer

If it is ok to use Grid, you can do

charts = Array[BarChart[Range @ Times[##]] &, {3, 2}];
rowlabels = {"row:" <> ToString[#], SpanFromLeft} & /@ Range[Length @ charts]; 
Grid @ Riffle[rowlabels, charts] 

enter image description here

For labeling each column, you can do:

columnLabels = {"column1", "column2"};
Grid[Prepend[charts, columnLabels]]

enter image description here

Correct answer by kglr on January 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP