MathGroup Archive 2011

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

Search the Archive

Re: GraphPlot bug? (missing self-loop)


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...