# adjacency matrix with directed graph connected nodes

I was trying to plot a 9x9 adjacency matrices which produce a useless directed graph.

Codes for that I used:

AbsoluteOptions[GridGraph[{3, 3}], VertexCoordinates]
VertexCoordinates -> Automatic
Manipulate[x = ConstantArray[0, 9 {1, 1}];
Row[{EventHandler[Dynamic[tds = Reverse[Transpose[x]];
MatrixPlot[tds, PlotRangePadding -> 0, Mesh -> All, ImageSize -> {200, 400}, ColorRules -> {1 -> Green, 0 -> None}]],
{"MouseClicked" :> (pos = Ceiling[MousePosition["Graphics"]];
x = ReplacePart[x, pos -> 1 - x[[Sequence @@ pos]]];)}],
VertexCoordinates], ImageSize -> {300, 300},
PlotRange -> {{.5, 3.5}, {.5, 3.5}},
VertexStyle -> Directive[Red, Opacity[.3]], VertexSize -> .2,
VertexLabels -> "Name", EdgeStyle -> Thick, DirectedEdges -> True]}],
{pos, ControlType -> None}, {x, ControlType -> None}, {tds, ControlType -> None}, AppearanceElements -> None, FrameMargins -> 0]


Here are the coordinates as an example:

{1,3}, {3,3}, {3,4}, {4,3}

to use click on cells with given coordinates,

output look like: Arrow between nodes number 1 and 3 pass over the node number 2 and another strange half arrow on node 3. It´s might not be able with GridGraph.

I dont know really how can I visualise this graph better?

• What is your question exactly? I don't understand. Sep 5 '15 at 14:25
• how can I resulting that graph better visualize (another Graphform)? I wanted for example, no arrow pass over the node like this given pictures. After the fulfillment of the adjacencymatrix I would not plot in GridGraph Form. Sep 5 '15 at 15:02

EdgeShapeFunction -> (Arrow[GraphElementData["CurvedArc"][##], .1] &)

to AdjacencyGraph[...]` to get 