Visualizing graphs
Here we show some examples on Graph
s
Graph[{1 -> 2, 2 -> 3, 3 -> 1}]
(*VB[*)(Graph[{1, 2, 3}, {UndirectedEdge[1, 2], UndirectedEdge[2, 3], UndirectedEdge[3, 1]}])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKp1qYmSRaWFjqmhgbGgMJU0PdJDOTJF3jVLM0I+NEQ9MUIxMAdH0U5A=="*)(*]VB*)
Graph[{1 -> 2, 2 -> 3, 3 -> 1}]
(*VB[*)(Graph[{1, 2, 3}, {DirectedEdge[1, 2], DirectedEdge[2, 3], DirectedEdge[3, 1]}])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKW5gbmCWlpJjppiRaGOuamKUY6lqmmRnqGqQYmJuYmVkmGyZZAgCBixVQ"*)(*]VB*)
Graph[{1 -> 2, 2 -> 3, 3 -> 1}, VertexShapeFunction -> "Diamond", VertexSize -> Medium]
(*VB[*)(Graph[{1, 2, 3}, {DirectedEdge[1, 2], DirectedEdge[2, 3], DirectedEdge[3, 1]}, {VertexShapeFunction -> {"Diamond"}, VertexSize -> {Medium}}])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKW5iYWCYZGiXrGhuYWeiaGJsn6iaaGSbqGpqZmyenGZomG1oaAwBznhTh"*)(*]VB*)
Or using Annotate
Graph[Table[ Annotation[ v, {VertexSize -> 0.2 + 0.2 Mod[v, 5], VertexStyle -> Hue[v/15, 1, 1]}], {v, 0, 14}], Table[v <-> Mod[v + 1, 15], {v, 0, 14}]]
(*VB[*)(Graph[{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, {UndirectedEdge[0, 1], UndirectedEdge[1, 2], UndirectedEdge[2, 3], UndirectedEdge[3, 4], UndirectedEdge[4, 5], UndirectedEdge[5, 6], UndirectedEdge[6, 7], UndirectedEdge[7, 8], UndirectedEdge[8, 9], UndirectedEdge[9, 10], UndirectedEdge[10, 11], UndirectedEdge[11, 12], UndirectedEdge[12, 13], UndirectedEdge[13, 14], UndirectedEdge[14, 0]}, {VertexSize -> {0 -> 0.2, 13 -> 0.8, 12 -> 0.6000000000000001, 9 -> 1., 3 -> 0.8, 14 -> 1., 11 -> 0.4, 2 -> 0.6000000000000001, 7 -> 0.6000000000000001, 4 -> 1., 6 -> 0.4, 10 -> 0.2, 5 -> 0.2, 1 -> 0.4, 8 -> 0.8}, VertexStyle -> {14 -> Hue[14/15, 1, 1], 8 -> Hue[8/15, 1, 1], 6 -> Hue[2/5, 1, 1], 3 -> Hue[1/5, 1, 1], 2 -> Hue[2/15, 1, 1], 11 -> Hue[11/15, 1, 1], 7 -> Hue[7/15, 1, 1], 4 -> Hue[4/15, 1, 1], 0 -> Hue[0, 1, 1], 5 -> Hue[1/3, 1, 1], 10 -> Hue[2/3, 1, 1], 12 -> Hue[4/5, 1, 1], 13 -> Hue[13/15, 1, 1], 1 -> Hue[1/15, 1, 1], 9 -> Hue[3/5, 1, 1]}}])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKG5hYGlimGRnrpqVYmOmamCZa6FoYWVjomqQYmluam5gZmqamAgBzTBTS"*)(*]VB*)
Generate random graphs
Graph[Thread[Range[20] -> RandomSample[Range[20]]]]
(*VB[*)(Graph[{1, 7, 2, 11, 3, 13, 4, 20, 5, 10, 6, 15, 18, 8, 14, 9, 12, 17, 16, 19}, {DirectedEdge[1, 7], DirectedEdge[2, 11], DirectedEdge[3, 13], DirectedEdge[4, 20], DirectedEdge[5, 10], DirectedEdge[6, 15], DirectedEdge[7, 18], DirectedEdge[8, 14], DirectedEdge[9, 12], DirectedEdge[10, 4], DirectedEdge[11, 17], DirectedEdge[12, 16], DirectedEdge[13, 1], DirectedEdge[14, 5], DirectedEdge[15, 6], DirectedEdge[16, 8], DirectedEdge[17, 2], DirectedEdge[18, 19], DirectedEdge[19, 3], DirectedEdge[20, 9]}])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKpxhbmqaamqfqppiapemaWFqY61qmmhrqJpsap5pZJJmZGacYAQCCvRVo"*)(*]VB*)
Graph[Table[i -> Mod[i^2, 74], {i, 100}]]
(*VB[*)(Graph[{1, 2, 4, 3, 9, 16, 5, 25, 6, 36, 7, 49, 8, 64, 10, 26, 11, 47, 12, 70, 13, 21, 14, 48, 15, 34, 17, 67, 18, 28, 19, 65, 20, 30, 71, 22, 40, 23, 24, 58, 33, 27, 63, 44, 29, 31, 73, 32, 62, 53, 46, 35, 41, 38, 37, 39, 42, 43, 45, 50, 51, 52, 54, 55, 56, 57, 59, 60, 61, 66, 68, 69, 72, 74, 0, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100}, {DirectedEdge[1, 1], DirectedEdge[2, 4], DirectedEdge[3, 9], DirectedEdge[4, 16], DirectedEdge[5, 25], DirectedEdge[6, 36], DirectedEdge[7, 49], DirectedEdge[8, 64], DirectedEdge[9, 7], DirectedEdge[10, 26], DirectedEdge[11, 47], DirectedEdge[12, 70], DirectedEdge[13, 21], DirectedEdge[14, 48], DirectedEdge[15, 3], DirectedEdge[16, 34], DirectedEdge[17, 67], DirectedEdge[18, 28], DirectedEdge[19, 65], DirectedEdge[20, 30], DirectedEdge[21, 71], DirectedEdge[22, 40], DirectedEdge[23, 11], DirectedEdge[24, 58], DirectedEdge[25, 33], DirectedEdge[26, 10], DirectedEdge[27, 63], DirectedEdge[28, 44], DirectedEdge[29, 27], DirectedEdge[30, 12], DirectedEdge[31, 73], DirectedEdge[32, 62], DirectedEdge[33, 53], DirectedEdge[34, 46], DirectedEdge[35, 41], DirectedEdge[36, 38], DirectedEdge[37, 37], DirectedEdge[38, 38], DirectedEdge[39, 41], DirectedEdge[40, 46], DirectedEdge[41, 53], DirectedEdge[42, 62], DirectedEdge[43, 73], DirectedEdge[44, 12], DirectedEdge[45, 27], DirectedEdge[46, 44], DirectedEdge[47, 63], DirectedEdge[48, 10], DirectedEdge[49, 33], DirectedEdge[50, 58], DirectedEdge[51, 11], DirectedEdge[52, 40], DirectedEdge[53, 71], DirectedEdge[54, 30], DirectedEdge[55, 65], DirectedEdge[56, 28], DirectedEdge[57, 67], DirectedEdge[58, 34], DirectedEdge[59, 3], DirectedEdge[60, 48], DirectedEdge[61, 21], DirectedEdge[62, 70], DirectedEdge[63, 47], DirectedEdge[64, 26], DirectedEdge[65, 7], DirectedEdge[66, 64], DirectedEdge[67, 49], DirectedEdge[68, 36], DirectedEdge[69, 25], DirectedEdge[70, 16], DirectedEdge[71, 9], DirectedEdge[72, 4], DirectedEdge[73, 1], DirectedEdge[74, 0], DirectedEdge[75, 1], DirectedEdge[76, 4], DirectedEdge[77, 9], DirectedEdge[78, 16], DirectedEdge[79, 25], DirectedEdge[80, 36], DirectedEdge[81, 49], DirectedEdge[82, 64], DirectedEdge[83, 7], DirectedEdge[84, 26], DirectedEdge[85, 47], DirectedEdge[86, 70], DirectedEdge[87, 21], DirectedEdge[88, 48], DirectedEdge[89, 3], DirectedEdge[90, 34], DirectedEdge[91, 67], DirectedEdge[92, 28], DirectedEdge[93, 65], DirectedEdge[94, 30], DirectedEdge[95, 71], DirectedEdge[96, 40], DirectedEdge[97, 11], DirectedEdge[98, 58], DirectedEdge[99, 33], DirectedEdge[100, 10]}])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKJ6ZYmhmlmFjomhkmpuqaJKaa6CaZmybqmhpaJppZWBqYGVgaAACHNxVJ"*)(*]VB*)