Question: How do I plot or map a matrix output with binary entries?

I have a question that concerns visualising the output of a simple matrix. For instance, take a 4 x 10 matrix in the example attached (rows are denoted by i and columns, j) with entries either 0 or 1. This gives the on/off relationship between any i and j. Let i and j denote 2-dimensional locations whose coordinates are known. The matrix gives the connections (1's) between both locations; 0's otherwise.

Can Maple output a map that visually represents the connections between nodes?

In the example here, I wish to plot location 2 (in i) connected to location 3 (in j), location 3 (in i) connected to location 1 (in j), and so on. Can I output a plot / map that presents the nodes with radiating / connecting arrows?

I'm hoping someone can help, since the matrix form is not quite appealing for a large number of entries.

 

Thanks for reading!
 

restart

A := Matrix(4, 10, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (2, 4) = 1, (2, 5) = 0, (2, 6) = 1, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0, (3, 4) = 0, (3, 5) = 1, (3, 6) = 0, (3, 7) = 1, (3, 8) = 1, (3, 9) = 1, (3, 10) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (4, 6) = 0, (4, 7) = 0, (4, 8) = 0, (4, 9) = 0, (4, 10) = 0})

 

``


 

Download Matrix_Plot_Question.mw

 

Please Wait...