Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

GraphPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114552] GraphPlot
  • From: Lou <lvveen32 at xs4all.nl>
  • Date: Tue, 7 Dec 2010 06:48:20 -0500 (EST)

Hi All,
I hope you can help.
I'm playing around with the GraphPlot function and would like to
separate the graphs into different plots (in e.g. a table].
So when there are 5 graphs plotted in one picture I would like 5
pictures.
The trick would be (I thought..) to get the graph data and use gather
to form the graphs with the vertexes connected but it seems the
GraphPlot function outsmarts the Gather function. So e.g. Gather will
disconnect some grahps.
I used Gather with a test function like OR'ing all the vertexes but it
seems Gather does not try out all possibilities.
Any of you other thoughts to solve this question?
so:
links = {"a" -> "b", "c" -> "b", "d" -> "b", "b" -> "e", "a1" -> "e",
  "c1" -> "e", "d1" -> "e", "q" -> "z", "r" -> "z", "s" -> "z"}
with GraphPlot[links] will generate 2 graphs.

Gather will make 3 graphs:
Gather[links, ((#1[[1]] == #2[[1]]) || (#1[[2]] == #2[[2]]) || (#1[[
       1]] == #2[[2]]) || (#1[[2]] == #2[[1]])) &]
outputs to
{{"a" -> "b", "c" -> "b", "d" -> "b", "b" -> "e"}, {"a1" -> "e",
  "c1" -> "e", "d1" -> "e"}, {"q" -> "z", "r" -> "z", "s" -> "z"}}
which results in 3 graphs..


  • Prev by Date: Re: Changing Graph style
  • Next by Date: Re: FileName Widget
  • Previous by thread: Re: JLink on virtual Linux server: Cannot createKernelLink
  • Next by thread: Re: GraphPlot