# How do I center an item in a Grid?

I was trying to use Grid to align different plots, two on the first row, and only one in the second row, so I have something like this (where a,b and c are plots): Grid[{{a, b},{c}}].

The problem is, I would like for the 'c' plot to be aligned directly below the union of 'a' and 'b', and not the default placement right below 'a' leaving nothing below 'b'. How could I do this? I can't seem to find an option for it or another question like mine.

• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory Tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. – bbgodfrey Aug 17 '15 at 3:43
• Try Grid[{{a, b}, {c, SpanFromLeft}}]. Here is the documentation for SpanFromLeft. – MarcoB Aug 17 '15 at 3:52
• Thank you MarcoB!! Such a simple thing! – Diego Aug 17 '15 at 4:05

There are a number of ways to do that, or something like that. These are the plots and your Grid function:

a = Plot[Sin[x], {x, 0, 2 \[Pi]}, ImageSize -> 200];
b = Plot[Sin[2 x], {x, 0, 2 \[Pi]}, ImageSize -> 200];
c = Plot[Sin[3 x], {x, 0, 2 \[Pi]}, ImageSize -> 200];
Grid[{{a, b}, {c}}]


It yields the following:

This places the plot c in the middle below a and b:

Column[{Row[{a, b}], c}, Alignment -> Center]


returning the following:

This also returns c in the middle, but there is some extra space between a and b:

Grid[{{a, b}, {Row[{Spacer[300], c}]}}]


You can play with the spacing to adjust the position.

And finally, the excellent advice of MarcoB given as a comment.

Have fun!