Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Dynamic Graphs' topicStudent Support Forum > General > Archives > "Dynamic Graphs"

Help | Reply To Topic
Author Comment/Response
OakenheaD
07/31/09 04:37am

Good day.

I am trying to implement interactivity in my graph plotting script. The idea is to load a graph via the adjacency list, them process it (ComputeParameters, a custom module utilizing other custom modules), and, output resultant adjacency matrix (AdjMat[[1]]), then draw the graph in a custom fashion DrawGraphCustom:
n = {{2, 8, 6}, {1, 9, 3}, {2, 10, 4}, {3, 11, 5}, {4, 12}, {1,
7}, {6, 8, 12}, {1, 7, 9}, {2, 8, 10}, {3, 9, 11}, {4, 10,
12}, {5, 11, 7}}; --default graph
Dynamic[AdjMat = ComputeParameters[n]];
Dynamic[
Panel[
Column[{InputField[Dynamic[n]],
"The Original graph is:\n",
GraphPlot[FromAdjacencyLists[n], VertexLabeling -> True],
"The Core matrix is:\n", MatrixForm[AdjMat[[1]] ],
"\nThe Core Graph is:",
GraphPlotCustom[FromAdjacencyMatrix[AdjMat[[1]] ], AdjMat[[2]],
AdjMat[[3]] ]}, ItemSize -> {380, Automatic};
Alignment -> {Center}], ImageSize -> {400, Automatic},
Alignment -> {Center}]]

The first graph is drawn fine and correctly, However, all references to AdjMat fail. What might be the reason, you think?

URL: ,
Help | Reply To Topic