Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm a little embarrassed asking such a simple question, but it's a problem I'm having since a long time. I want to e.g. have a plot beside some text. Now, I want that the top line of the plot and the top line of the text are at the same hight. I can't get this to work. When I use Alignment -> Top the text is always aligned at the middle and I don't know why. This sounds all very simple, so any help is appreciated. E.g.

Row[{ListPlot[{1, 2, 1, 3}, Joined -> True, Frame -> True,ImageSize -> 400], "    ", Framed@Grid[{{"test"}, {"test2"}}]}, Alignment -> Top]

The result is>

enter image description here

So top line of plot and of text not at the same height.

share|improve this question
    
Use Grid[{{...}},Alignment->{Center,Top}]. p.s. Spacer is neater than " ". –  Kuba Jan 16 at 20:44
    
I tried this, but then the text is below the plot. I want it beside the plot, but so that the lines at the top of the plot and that of the text are aligned. So, the text needs to go higher. – Thanks for the 'Spacer' tip, though. –  Mockup Dungeon Jan 16 at 20:52
    
I believe you are talking about Grid[{{...},{...}}]. It's not what I meant, the answer of PatoCorillo is. –  Kuba Jan 16 at 21:06
    
Yes, I have it now. Thanks. I didn't realise this doesn't work with Row. –  Mockup Dungeon Jan 16 at 21:08

1 Answer 1

up vote 1 down vote accepted
Grid[{{ListPlot[{1, 2, 1, 3}, Joined -> True, Frame -> True, 
    ImageSize -> 400], Framed@Grid[{{"test"}, {"test2"}}]}}, 
 Alignment -> Top]
share|improve this answer
    
OK, interesting, now I got it. Curious this doesn't work with Row! Thanks. –  Mockup Dungeon Jan 16 at 21:03

Your Answer

 
discard

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.