I have data in two Grids with a different number of rows each and want the output to be formatted to have the two grids in a row aligned at the top.
Here is a MWE:
First the headers (same number of column in the grids)
headersLeft = {"h11", "h12", "h13"};
headersRight = {"h21", "h22", "h23"};
next the data:
dataLeft =
Flatten /@
Transpose@({{"one", "two", "three"}, Table[
RandomReal[10, 2], {3}]});
dataRight =
Flatten /@ Transpose@({{"one", "two", "three", "four",
"five"}, Table[RandomReal[10, 2], {5}]});
then:
Row[{Grid[Prepend[dataLeft, headersLeft]],
Grid[Prepend[dataRight, headersRight]]
}, Spacer[20], Alignment -> {Center, Top}]
I get:
Question: How can I get the grids aligned at top? I tried with ItemSize, but this is only good for the sizes of each item (in the Grid). Also Frame is not displayed when given as an option. Same output as shown when using:
Row[{Grid[Prepend[dataLeft, headersLeft]],
Grid[Prepend[dataRight, headersRight]]
}, Spacer[20], Alignment -> {Center, Top}, Frame -> All]