Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Odd Behavior of GraphicsRow and GraphPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115989] Re: Odd Behavior of GraphicsRow and GraphPlot
  • From: Peter Pein <petsie at dordos.net>
  • Date: Fri, 28 Jan 2011 06:15:17 -0500 (EST)
  • References: <ihrb2r$8q2$1@smc.vnet.net>

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 fix it.
>
> Anyone have any ideas?
>
> Yours,
>
> Alistair Windsor
>


Hi,

here works:
Row[Append[#, ImageSize -> 222] & /@ {g1, g2, g3}]

Cheers,
Peter


  • Prev by Date: Re: About Table
  • Next by Date: Finding the Local Minima of a somewhat complicated function
  • Previous by thread: Odd Behavior of GraphicsRow and GraphPlot
  • Next by thread: Re: Odd Behavior of GraphicsRow and GraphPlot