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

MathGroup Archive 2011

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

Search the Archive

Re: GraphPlot bug? (missing self-loop)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121658] Re: GraphPlot bug? (missing self-loop)
  • From: Alan <alan.isaac at gmail.com>
  • Date: Sat, 24 Sep 2011 22:33:18 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j5f68l$q85$1@smc.vnet.net> <j5hdj8$7jl$1@smc.vnet.net>
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

Follow up question.  The code below almost works how I want, but the last line produces a graph that does not show node c. How can I get node c to display when there are no edges to it? (I know I can do this with Graph by providing a list of nodes, but how to do it with GraphPlot?)

Thanks,
Alan Isaac

abcGraphPlot[rules_] := GraphPlot[rules,
  VertexLabeling -> True,
  MultiedgeStyle -> False,
  EdgeRenderingFunction -> ({Red, Arrowheads[0.05],
      Arrow[#1, 0.15]} &),
  DirectedEdges -> True,
  SelfLoopStyle -> 0.3,
  VertexCoordinateRules -> {a -> {1, Sqrt[3]}, b -> {0, 0},
    c -> {2, 0}},
  VertexRenderingFunction -> ({GrayLevel[0.9], EdgeForm[Black],
      Disk[#, .15], Black, Text[#2, #1]} &),
  ImagePadding -> 10,
  ImageSize -> 200]
abcGraphPlot[{a -> a, a -> b, b -> a, c -> c}]
abcGraphPlot[{a -> a, a -> b, b -> a}]




  • Prev by Date: Re: Error Message on Magnification
  • Next by Date: Re: 1-liner wanted
  • Previous by thread: Re: GraphPlot bug? (missing self-loop)
  • Next by thread: Bug with Sequence and Assignment by Part...