Re: Odd Behavior of GraphicsRow and GraphPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg116032] Re: Odd Behavior of GraphicsRow and GraphPlot
- From: Heike Gramberg <heike.gramberg at gmail.com>
- Date: Sat, 29 Jan 2011 19:42:04 -0500 (EST)
Setting ImagePadding -> None in the individual graphs seems to work, i.e. something like
GraphicsRow[ Map[Show[#, ImagePadding -> None] &, {g1, g2, g3}] ]
Heike.
On 27.01.2011 09:40, Alistair Windsor wrote:
> Dear All,
>
> I have a collection of 3 graphs
>
> vRF[pos_, name_] := {White, EdgeForm[Black], Disk[pos, .1], Black,
> Text[name, pos]}
>
> g1 = GraphPlot[{{1 -> 1, "2"}, {1 -> 2, "12"}, {2 -> 1, "9"}, {2 -> 2,
> "2"}, {3 -> 2, "6"}, {3 -> 3, "5"}, {1 -> 3, "15"}, {3 -> 1,
> "9"}}, DirectedEdges -> True, SelfLoopStyle -> .2,
> Method -> "CircularEmbedding", VertexRenderingFunction -> vRF];
>
> g2 =
> GraphPlot[{{1 -> 2, "12"}, {2 -> 1, "9"}, {3 -> 2, "6"}, {3 -> 3,
> "3"}, {1 -> 3, "15"}, {3 -> 1, "9"}}, DirectedEdges -> True,
> SelfLoopStyle -> .2, Method -> "CircularEmbedding",
> VertexRenderingFunction -> vRF];
>
> g3 =
> GraphPlot[{{1 -> 2, "4"}, {2 -> 1, "3"}, {3 -> 2, "2"}, {3 -> 3,
> "1"}, {1 -> 3, "5"}, {3 -> 1, "3"}}, DirectedEdges -> True,
> SelfLoopStyle -> .2, Method -> "CircularEmbedding",
> VertexRenderingFunction -> vRF];
>
> If I combine these with
>
> Row[{g1,g2,g3}]
>
> I get (almost) exactly what I want. However the sizing is wrong and I
> cannot scale the output as a whole since it is not a single graphics
> directive. To get this as a single Graphics object I use
>
> GraphicsRow[{g1,g2,g3}]
>
> but this yields something very different from the Row command. The
> graphs are not visible at all.
>
> I am using Mathematica 8.0.0 on Mac OS X.
>
> I have had this problem once before but cannot remember what I did to fixit.
>
> Anyone have any ideas?
>
> Yours,
>
> Alistair Windsor
>