Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I often seek to display two graphs, side by side, with a common label over them. There is no option for adding a label to GraphicsRow, which means, I think, that I need to use Grid or GraphicsGrid and include a row on top that has SpanFromLeft set to allow a graphically defined line of text occupy the entire row.

It seems like a lot of work to do something simple. Is there a better solution?

share|improve this question
You can use Labeled – R. M. Sep 24 '13 at 0:07
up vote 20 down vote accepted

GraphicsRow takes a PlotLabel option:

p1 = Plot[Sin[x], {x, 0, Pi}, PlotLabel -> Sin];
p2 = Plot[Cos[x], {x, 0, Pi}, PlotLabel -> Cos];
GraphicsRow[{p1, p2}, PlotLabel -> "Two plots"]

enter image description here

share|improve this answer
I can't imagine how I missed this. Thanks. – Michael Stern Sep 24 '13 at 0:36
@MichaelStern Easy to miss since it's not in the GraphicsRow documentation :) – ssch Sep 24 '13 at 0:38
@Michael Indeed, this is the first time I can recall seeing this, so thank you for asking the question! (+1 of course, ssch) – Mr.Wizard Sep 24 '13 at 0:50

When I need more interface control, I usually do something like this:

title=Panel[Style["Test Label",White,20],ImageSize->300,Background->Orange,Alignment->Center];

enter image description here

share|improve this answer

Possibly more versatile, but you have to mess with text overlapping your plots, but GraphicsRow also accepts Epilog

GraphicsRow[{Plot[Sin[x], {x, 0, 4 Pi}], Plot[Cos[x], {x, 0, 4 Pi}]}, 
 Spacings -> Scaled[0.4], 
 Epilog -> Inset["Plot Title", Scaled[{0.5, 0.95}]]]

Mathematica graphics

share|improve this answer
PlotRangePadding -> {0, {0, 25}} could help avoid possible text/plot collisions. – ssch Sep 24 '13 at 0:24
@ssch Thanks - I figured there was a padding option, but couldn't put my finger on it. – bobthechemist Sep 24 '13 at 0:26
I'd accept this answer too, if only StackExchange would let me. – Michael Stern Sep 24 '13 at 0:36

Few additional methods:

p1 = Plot[Sin[x], {x, 0, 2 Pi}, ImageSize -> 200];
p2 = Plot[Cos[x], {x, 0, 2 Pi}, ImageSize -> 200];


Labeled[Panel@GraphicsRow[{p1, p2}], Style["Label", "Subsubsection"], Top] // Panel

enter image description here


Panel[GraphicsRow[{p1, p2}], Style["Label", "Subsubsection"], Top] // Panel
(* same picture *)


Legended[Panel@GraphicsRow[{p1, p2}], Placed[Style["Label", "Subsubsection"], Top]] // Panel
(* same picture *)

Show with PlotLabel

Show[GraphicsRow[{p1, p2}],  PlotLabel -> Style["Label", "Subsubsection"]] // Panel

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.