I have some code that builds a graph and some vertex coordinates, but when I evaluate it I get a message that the list of coordinates is not valid and the graph is not valid and it shows the output as an unevaluated GraphPlot. Then if I evaluate the unevaluated GraphPlot manually it works fine. I have tried using Evaluate manually, but no luck.
I evaluate this:
GraphPlot[edges, VertexCoordinateRules -> coords]
I get these:
GraphPlot::vpr: Value of option VertexCoordinateRules -> {{1,2,3,4,5,6,7,8,9,10,11}->{1.,1.79586*10^-10},{1,10,3,11,7,6,5,9,8,2,4}->{0.,2.6938*10^-10},{8,9,4,1,2,5,7,3,6,10,11}->{2.,0.}} is not a valid list of coordinate rules. >>
GraphPlot::grph: {{1,2,3,4,5,6,7,8,9,10,11}->{1,10,3,11,7,6,5,9,8,2,4},{1,2,3,4,5,6,7,8,9,10,11}->{8,9,4,1,2,5,7,3,6,10,11},{1,10,3,11,7,6,5,9,8,2,4}->{1,2,3,4,5,6,7,8,9,10,11},{1,10,3,11,7,6,5,9,8,2,4}->{9,8,11,1,10,7,5,3,6,2,4},{8,9,4,1,2,5,7,3,6,10,11}->{3,6,1,8,9,2,7,4,5,10,11},{8,9,4,1,2,5,7,3,6,10,11}->{8,10,4,11,7,5,2,6,3,9,1}} is not a valid graph. >>
GraphPlot[{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} -> {1, 10, 3, 11, 7, 6,
5, 9, 8, 2, 4}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} -> {8, 9, 4,
1, 2, 5, 7, 3, 6, 10, 11}, {1, 10, 3, 11, 7, 6, 5, 9, 8, 2,
4} -> {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, {1, 10, 3, 11, 7, 6, 5,
9, 8, 2, 4} -> {9, 8, 11, 1, 10, 7, 5, 3, 6, 2, 4}, {8, 9, 4, 1,
2, 5, 7, 3, 6, 10, 11} -> {3, 6, 1, 8, 9, 2, 7, 4, 5, 10, 11}, {8,
9, 4, 1, 2, 5, 7, 3, 6, 10, 11} -> {8, 10, 4, 11, 7, 5, 2, 6, 3,
9, 1}}, VertexCoordinateRules -> {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11} -> {1., 1.79586*10^-10}, {1, 10, 3, 11, 7, 6, 5, 9, 8, 2,
4} -> {0., 2.6938*10^-10}, {8, 9, 4, 1, 2, 5, 7, 3, 6, 10,
11} -> {2., 0.}}]
Then if I manually evaluate the output it works fine. Here is the full code. I haven't figured out a smallest repro yet.
{op1, op2} = GroupGenerators@MathieuGroupM11[];
elems = {Range[11]};
edges = {};
coords = {};
frames = {};
frames = Reap@
While[Length@elems < 10,
AppendTo[elems, Permute[#, op1]]; AppendTo[elems, Permute[#, op2]];
AppendTo[edges, # -> Permute[#, op1]];
AppendTo[edges, # -> Permute[#, op2]]; & /@ elems;
elems = Union[elems]; edges = Union[edges];
Sow[g = GraphPlot[edges,
VertexCoordinateRules ->
If[Length@coords > 0, coords, Automatic]]];
coords =
Union[coords,
Rule @@@
Transpose@{Cases[g, Tooltip[_, a_] -> a, Infinity],
Cases[g, (VertexCoordinateRules -> a_) -> a,
Infinity][[1]]}];]


