Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Easy way to label graphics grids?

1,190 views
Skip to first unread message

René Wuttke

unread,
Apr 19, 2010, 5:59:48 AM4/19/10
to
Hey everyone,

do you know if there is an easy way to label the rows and columns of a
GraphicsGrid? like this:

Label A Graph Graph Graph
Label B Graph Graph Graph
Label C Graph Graph Graph
Label 1 Label 2 Label 3

Thanks,
Ren=E9

Helen Read

unread,
Apr 20, 2010, 5:49:20 AM4/20/10
to

The only way I really know how to do it is to stick in extra rows /
columns for the labels. I'd like to have RowLabels and ColumnLabels as
options for Grid and GraphicsGrid.

--
Helen Read
University of Vermont


dh

unread,
Apr 20, 2010, 5:51:50 AM4/20/10
to

Hi,
GraphicsGrid does not have a labeling mechanism like Table. Thererfore,
you must include the labels into the data. here is a simple example:

g = Plot[Sin[x], {x, 0, 10}];
GraphicsGrid[{{"label11", g, g}, {"label12", g, g}, {"", "label21",
"label22"}}]

Daniel

--

Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:d...@metrohm.com>
Internet:<http://www.metrohm.com>


Bob Hanlon

unread,
Apr 20, 2010, 5:53:39 AM4/20/10
to

plts ==
Table[
Plot[a*x^b, {x, 0, 1}],
{a, 3}, {b, 0, 2}];

rowLabels == Table["a == " <> ToString[a], {a, 3}];
columnLabels == Prepend[
Table["b == " <> ToString[b], {b, 0, 2}], ""];

Grid[
Append[
Transpose[
Prepend[Transpose[plts], rowLabels]],
columnLabels]]


Bob Hanlon

---- "Ren=C3=A9 Wuttke" <re...@wuttke.com> wrote:

==========================
Hey everyone,

do you know if there is an easy way to label the rows and columns of a
GraphicsGrid? like this:

Label A Graph Graph Graph
Label B Graph Graph Graph
Label C Graph Graph Graph
Label 1 Label 2 Label 3

Thanks,
Ren==E9


David Annetts

unread,
Apr 20, 2010, 5:53:50 AM4/20/10
to
Hi Ren=E9 ,

> Hey everyone,
>
> do you know if there is an easy way to label the rows and columns of a
> GraphicsGrid? like this:
>
> Label A Graph Graph Graph
> Label B Graph Graph Graph
> Label C Graph Graph Graph
> Label 1 Label 2 Label 3
>
> Thanks,
> Ren==E9
>
>

Epilog would be your best bet. It's easy but tedious.

D.

Syd Geraghty

unread,
Apr 21, 2010, 4:30:31 AM4/21/10
to
Hi Ren=E9 & Daniel,

Another suggestion is to customize to your taste:-

graphics == MapThread[
Plot[#1[x], {x, 0, 2 Pi},
FrameLabel -> {"x\n\n" <> #2, #1[x], #1[x], None},
Frame -> True] &, {{Sin, Cos, Tan, Cot}, {"( a )", "( b )",
"( c )", "( d )"}}];

GraphicsGrid[Partition[graphics, 2], ImageSize -> 800]

I believe I got the idea some years back from David Park (because it seems so elegant).

Cheers .... Syd

Syd Geraghty B.Sc, M.Sc.

sydge...@mac.com

Mathematica 7.0.1.0 for Mac OS X x86 (64 - bit) (12th September 2009)
MacOS X V 10.6.1 Snow Leopard
MacBook Pro 2.33 GHz Intel Core 2 Duo 2GB RAM


On Apr 20, 2010, at 2:52 AM, dh wrote:

> On 19.04.2010 11:59, Ren=E9 Wuttke wrote:
>> Hey everyone,
>>
>> do you know if there is an easy way to label the rows and columns of a
>> GraphicsGrid? like this:
>>
>> Label A Graph Graph Graph
>> Label B Graph Graph Graph
>> Label C Graph Graph Graph
>> Label 1 Label 2 Label 3
>>
>> Thanks,
>> Ren==E9
>>
>

> Hi,
> GraphicsGrid does not have a labeling mechanism like Table. Thererfore,=

> you must include the labels into the data. here is a simple example:
>

> g == Plot[Sin[x], {x, 0, 10}];

0 new messages