Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5350
| From | Alan <alan.isaac@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | workaround for GraphPlot not accepting node list? |
| Date | 2011-10-03 08:31 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j6brtn$8oc$1@smc.vnet.net> (permalink) |
The last line below produces a graph that does not show node c. How can I get node c to display when there are no edges to it? (Graph accepts a list of nodes, but how to do this 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}] (* how to show node c? *)
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
workaround for GraphPlot not accepting node list? Alan <alan.isaac@gmail.com> - 2011-10-03 08:31 +0000
csiph-web