General Graph Drawing
| GraphPlot[{vi1->vj1,vi2->vj2,…}] | generate a plot of the graph in which vertex vik is connected to vertex vjk |
| GraphPlot[{{vi1->vj1,lbl1},…}] | associate labels lblk with edges in the graph |
| GraphPlot[m] | generate a plot of the graph represented by the adjacency matrix m |
| GraphPlot3D[{vi1->vj1,vi2->vj2,…}] | generate a 3D plot of the graph in which vertex vik is connected to vertex vjk |
| GraphPlot3D[{{vi1->vj1,lbl1},…}] | associate labels lblk with edges in the graph |
| GraphPlot3D[m] | generate a 3D plot of the graph represented by the adjacency matrix m |
GraphPlot[{"d" -> "c", "e" -> "b", "e" -> "c", "e" -> "d", "f" -> "a", "f" -> "b", "f" -> "d", "f" -> "e", "g" -> "a", "g" -> "b", "g" -> "c", "g" -> "e"}, VertexLabels -> Automatic]GraphPlot[Table[i -> Mod[i ^ 2, 129], {i, 0, 128}]]a = Import["LinearAlgebraExamples/Data/dwt_1005.psa", "HarwellBoeing"];GraphPlot3D[a, VertexShapeFunction -> None]option name | default value | |
| DirectedEdges | False | whether to show edges as directed arrows |
| EdgeLabels | Automatic | whether to include labels given for edges |
| EdgeShapeFunction | Automatic | function to give explicit graphics for edges |
| GraphLayout | Automatic | the method used to lay out the graph |
| MultiedgeStyle | Automatic | how to draw multiple edges between vertices |
| PlotRangePadding | Automatic | how much padding to put around the plot |
| "PackingLayout" | Automatic | method to use for packing components |
| PlotStyle | Automatic | style in which objects are drawn |
| SelfLoopStyle | Automatic | how to draw edges linking a vertex to itself |
| VertexCoordinates | Automatic | rules for explicit vertex coordinates |
| VertexLabels | Automatic | whether to show vertex names as labels |
| VertexShapeFunction | Automatic | function to give explicit graphics for vertices |
DirectedEdges
GraphPlot[{1 -> 6, 2 -> 6, 3 -> 6, 4 -> 6, 5 -> 6}, DirectedEdges -> True, VertexLabels -> Automatic]EdgeLabels
GraphPlot[{1 -> 5, 1 -> 6, 2 -> 4, 2 -> 6, 3 -> 4, 3 -> 5, {3 -> 6, "edge 3->6"}, 4 -> 6, 5 -> 6}, VertexLabels -> Automatic]GraphPlot[{1 -> 5, 1 -> 6, 2 -> 4, 2 -> 6, 3 -> 4, {3 -> 5, Tooltip[ "edge 3->5", "3->5"]}, Tooltip[3 -> 6, "3->6"], 4 -> 6, 5 -> 6}, VertexLabels -> Automatic]EdgeShapeFunction
GraphPlot[Table[1, {30}, {30}], EdgeShapeFunction -> None]GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 7, 7 -> 1, 11 -> 12, 12 -> 13, 13 -> 14, 14 -> 15, 15 -> 16, 16 -> 17, 17 -> 11, 1 -> 11, 2 -> 12, 3 -> 13, 4 -> 14, 5 -> 15, 6 -> 16, 7 -> 17}, EdgeShapeFunction -> ({GrayLevel[0.5], Arrow[#1, 0.1]}&)]Table[
GraphPlot[{1 -> 6, 2 -> 6, 3 -> 6, 4 -> 6, 5 -> 6}, ImageSize -> 150, EdgeShapeFunction -> {{"Arrow", "ArrowSize" -> asize}}], {asize, {0.05, 0.1, 0.15}}]GraphPlot[{1 -> 5, 1 -> 6, 2 -> 4, 2 -> 6, 3 -> 4, 3 -> 5, 3 -> 6, 4 -> 6, 5 -> 6}, EdgeShapeFunction -> ({Line[#1], Text[#2, Total[#1] / 2., Background -> White]}&), VertexLabels -> Automatic]GraphPlot3D[{1 -> 2, 2 -> 3, 3 -> 4, 5 -> 1, 5 -> 2, 5 -> 3, 5 -> 4, 1 -> 4, 3 -> 5, 3 -> 3}, EdgeShapeFunction -> (If [Length[#1] > 2, {Red, Line[#1]}, Line[#1]]&)]GraphPlot3D[{2 -> 1, 5 -> 1, 6 -> 1, 3 -> 2, 11 -> 2, 4 -> 3, 16 -> 3, 5 -> 4, 21 -> 4, 26 -> 5, 7 -> 6, 10 -> 6, 8 -> 7, 30 -> 7, 9 -> 8, 42 -> 8, 10 -> 9, 38 -> 9, 12 -> 10, 12 -> 11, 15 -> 11, 13 -> 12, 14 -> 13, 37 -> 13, 15 -> 14, 33 -> 14, 17 -> 15, 17 -> 16, 20 -> 16, 18 -> 17, 19 -> 18, 32 -> 18, 20 -> 19, 53 -> 19, 22 -> 20, 22 -> 21, 25 -> 21, 23 -> 22, 24 -> 23, 52 -> 23, 25 -> 24, 48 -> 24, 27 -> 25, 27 -> 26, 30 -> 26, 28 -> 27, 29 -> 28, 47 -> 28, 30 -> 29, 43 -> 29, 32 -> 31, 35 -> 31, 54 -> 31, 33 -> 32, 34 -> 33, 35 -> 34, 36 -> 34, 56 -> 35, 37 -> 36, 40 -> 36, 38 -> 37, 39 -> 38, 40 -> 39, 41 -> 39, 57 -> 40, 42 -> 41, 45 -> 41, 43 -> 42, 44 -> 43, 45 -> 44, 46 -> 44, 58 -> 45, 47 -> 46, 50 -> 46, 48 -> 47, 49 -> 48, 50 -> 49, 51 -> 49, 59 -> 50, 52 -> 51, 55 -> 51, 53 -> 52, 54 -> 53, 55 -> 54, 60 -> 55, 57 -> 56, 60 -> 56, 58 -> 57, 59 -> 58, 60 -> 59}, EdgeShapeFunction -> ({Cylinder[#1, .05]}&), VertexShapeFunction -> ({Sphere[#, .15]}&)]Spring[{x0_, y0_}, n_ : 10] := Module[{x = x0 + (y0 - x0) * 0.05, y = y0 + (x0 - y0) * 0.1, theta}, theta = If[(y0 - x0)[[1]] == 0., Pi / 2., ArcTan[(y0 - x0)[[2]] / ((y0 - x0)[[1]])]];
Line[Join[{x0}, Table[x + (y - x) * t + 0.05 {Cos[ 2 Pi n t + theta], Sin[2 Pi n t + theta], 0}, {t, 0, 1, .005}], {y0}]]];
GraphPlot3D[{1 -> 2, 2 -> 3, 3 -> 1, 1 -> 4, 2 -> 4, 3 -> 4}, EdgeShapeFunction -> ({Blue, Spring[#1]}&), VertexShapeFunction -> (Sphere[#1, 0.1]&)]normal[{x_, y_}] := 0.03 * {-y, x} / Norm[{x, y}];
GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 1, 1 -> 2, 3 -> 4, 5 -> 6, 1 -> 7, 2 -> 8, 3 -> 9, 4 -> 10, 5 -> 11, 6 -> 12}, VertexShapeFunction -> (Text[Style[If[#2 ≤ 6, "C", "H"], Bold], #1, Background -> White]&), EdgeShapeFunction -> (If[Length[#1] > 2, norm = normal[First[#1] - Last[#1]];{Line[{First[#1] + norm, Last[#1] + norm}], Line[{First[#1] - norm, Last[#1] - norm}]}, Line[#1]]&)]GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 1}, EdgeShapeFunction -> ({Arrow[#], Inset["Mathematica", Mean[#1], Automatic, Automatic, #[[1]] - #[[2]], Background -> White]}&)]arrow = [image];GraphPlot[{1 -> 5, 1 -> 6, 2 -> 4, 2 -> 6, 3 -> 4, 3 -> 5, 3 -> 6, 4 -> 6, 5 -> 6}, EdgeShapeFunction -> ({Line[#], Inset[arrow, Mean[#1], Automatic, Automatic, #[[1]] - #[[2]], Background -> White]}&)]GraphLayout
| Automatic | a method suitable for the problem is chosen automatically |
| "CircularEmbedding" | lay out the vertices in a circle |
| "HighDimensionalEmbedding" | invoke the high-dimensional embedding method, in which the graph is first laid out in a high-dimensional space based on the graph distances of the vertices to k centers; this layout is then projected to 2D or 3D space by linear combination of the high-dimensional coordinates using principal component analysis |
| "RadialEmbedding" | invoke the radial embedding method, which is most suitable for tree or tree-like graphs; if the graph is not a tree, a spanning tree is first constructed, and a radial embedding of the spanning tree is used to derive the drawing for the graph |
| "RandomEmbedding" | lay out vertices randomly |
| "SpiralEmbedding" |
lay out the vertices in a spiral; in 3D, this distributes vertices uniformly on a sphere
|
| "SpringElectricalEmbedding" | invoke the spring-electrical embedding method, in which neighboring vertices are subject to an attractive spring force that is proportional to their physical distance, and all vertices are subject to a repulsive electrical force that is inversely proportional to their distance; the overall energy is minimized |
| "SpringEmbedding" | invoke the spring embedding method, in which a vertex is subject to either attractive or repulsive force from another vertex, as though they are connected by a spring; the spring has an ideal length equal to the graph distance between the vertices; the total spring energy is minimized |
GraphPlot[{1 -> 3, 1 -> 4, 2 -> 4, 2 -> 5, 3 -> 5, 6 -> 7, 7 -> 8, 8 -> 9, 9 -> 10, 6 -> 10, 1 -> 6, 2 -> 7, 3 -> 8, 4 -> 9, 5 -> 10}, VertexLabels -> Automatic]GraphPlot[{1 -> 3, 1 -> 4, 2 -> 4, 2 -> 5, 3 -> 5, 6 -> 7, 7 -> 8, 8 -> 9, 9 -> 10, 6 -> 10, 1 -> 6, 2 -> 7, 3 -> 8, 4 -> 9, 5 -> 10}, GraphLayout -> "SpringEmbedding", VertexLabels -> Automatic]GraphPlot[{1 -> 3, 1 -> 4, 2 -> 4, 2 -> 5, 3 -> 5, 6 -> 7, 7 -> 8, 8 -> 9, 9 -> 10, 6 -> 10, 1 -> 6, 2 -> 7, 3 -> 8, 4 -> 9, 5 -> 10}, GraphLayout -> "HighDimensionalEmbedding", VertexLabels -> Automatic]GraphPlot[Table[1, {30}, {30}], GraphLayout -> "CircularEmbedding", VertexLabels -> Automatic]GraphPlot3D[Table[1, {30}, {30}], GraphLayout -> "SpiralEmbedding", VertexLabels -> Automatic]GraphPlot[Table[1, {30}, {30}], GraphLayout -> "RandomEmbedding", VertexLabels -> Automatic]MultiedgeStyle
GraphPlot[{1 -> 2, 2 -> 1, 1 -> 2, 1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 1}, DirectedEdges -> True, VertexLabels -> Automatic]GraphPlot[(| | | | | | |
| :- | :- | :- | :- | :- | :- |
| 0 | 3 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 | 0 |), VertexLabels -> Automatic]GraphPlot[{1 -> 2, 2 -> 1, 1 -> 2, 1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 1}, MultiedgeStyle -> 1, DirectedEdges -> True, VertexLabels -> Automatic]PackingLayout
g = Flatten[Table[x = RandomReal[1, {50 + 1}];Table[x[[i + 1]] -> x[[Mod[i ^ 2, 50] + 1]], {i, 0, 50}], {10}]];GraphPlot[g]g = Flatten[Table[x = RandomReal[1, {50 + 1}];Table[x[[i + 1]] -> x[[Mod[i ^ 2, 50] + 1]], {i, 0, 50}], {10}]];GraphPlot[g, GraphLayout -> {"PackingLayout" -> "ClosestPackingCenter"}]g = Flatten[Table[x = RandomReal[1, {50 + 1}];Table[x[[i + 1]] -> x[[Mod[i ^ 2, 50] + 1]], {i, 0, 50}], {10}]];GraphPlot[g, GraphLayout -> {"PackingLayout" -> {"ClosestPackingCenter", "Padding" -> 1}}]g = Flatten[Table[x = RandomReal[1, {50 + 1}];Table[x[[i + 1]] -> x[[Mod[i ^ 2, 50] + 1]], {i, 0, 50}], {10}]];GraphPlot[g, GraphLayout -> {"PackingLayout" -> {"ClosestPackingCenter", "PolyominoNumber" -> 5, "Padding" -> 1}}]PlotRangePadding
PlotStyle
GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 1, 6 -> 5, 7 -> 5, 5 -> 4, 9 -> 8, 10 -> 8, 8 -> 3, 12 -> 11, 13 -> 11, 11 -> 1, 15 -> 14, 16 -> 14, 14 -> 2}, VertexLabels -> Automatic, PlotStyle -> {Red, Thickness[0.02]}]SelfLoopStyle
GraphPlot[{3 -> 2, 4 -> 1, 4 -> 3, 5 -> 1, 5 -> 2, 6 -> 1, 6 -> 2, 6 -> 3, 6 -> 4, 6 -> 5, 1 -> 1, 1 -> 1}, VertexLabels -> Automatic]GraphPlot[(| | | | | | |
| :- | :- | :- | :- | :- | :- |
| 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 0 | 2 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 | 0 |), VertexLabels -> Automatic]GraphPlot[{3 -> 2, 4 -> 1, 4 -> 3, 5 -> 1, 5 -> 2, 6 -> 1, 6 -> 2, 6 -> 3, 6 -> 4, 6 -> 5, 1 -> 1, 1 -> 1}, VertexLabels -> Automatic, SelfLoopStyle -> 1]VertexCoordinates
GraphPlot[{1 -> 3, 1 -> 4, 2 -> 4, 2 -> 5, 3 -> 5, 6 -> 7, 7 -> 8, 8 -> 9, 9 -> 10, 6 -> 10, 1 -> 6, 2 -> 7, 3 -> 8, 4 -> 9, 5 -> 10}, VertexCoordinates -> {{0.309, 0.951}, {-0.809, -0.587}, {0.309, -0.951}, {-0.809, 0.587}, {1., 0}, {0.618, 1.902}, {-1.618, 1.175}, {-1.618, -1.175}, {0.618, -1.902}, {2., 0}}]GraphPlot[{1 -> 3, 1 -> 4, 2 -> 4, 2 -> 5, 3 -> 5, 6 -> 7, 7 -> 8, 8 -> 9, 9 -> 10, 6 -> 10, 1 -> 6, 2 -> 7, 3 -> 8, 4 -> 9, 5 -> 10}, GraphLayout -> "SpringEmbedding"]GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 1}, VertexCoordinates -> {1 -> {1, 1}, 2 -> {2, 3}}, Frame -> True, FrameTicks -> True, VertexLabels -> Automatic]GraphPlot[{1 -> 4, 2 -> 3, 2 -> 5, 1 -> 3}, VertexCoordinates -> {1 -> {Automatic, 1}, 2 -> {Automatic, 1}, 3 -> {Automatic, 2}, 4 -> {Automatic, 2}, 5 -> {Automatic, 2}}, Frame -> True, FrameTicks -> True, VertexLabels -> Automatic]bipartite = {1 -> b, 2 -> a, 3 -> a, 3 -> d, 4 -> c, 4 -> a, 4 -> b};
g = Join[bipartite, Map[(Left -> #[[1]])&, bipartite], Map[(Right -> #[[2]])&, bipartite]];GraphPlot[g, VertexCoordinates -> {left -> {-2, 0}, right -> {2, 0}, Sequence@@Flatten[Map[({#[[1]] -> {-1, Automatic}, #[[2]] -> {1, Automatic}})&, bipartite]]}, VertexShapeFunction -> (If[#2 =!= Left && #2 =!= Right, Text[#2, #1, Background -> White], {}]&), EdgeShapeFunction -> (If[!MemberQ[{Left, Right}, #2[[1]]] && !MemberQ[{Left, Right}, #2[[2]]], Line[#1], {}]&)]GraphPlot[bipartite, VertexCoordinates -> Flatten[Map[({#[[1]] -> {-1, Automatic}, #[[2]] -> {1, Automatic}})&, bipartite]], VertexLabels -> Automatic]VertexLabels
GraphPlot[(| | | | | |
| :- | :- | :- | :- | :- |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 |), VertexLabels -> Automatic]GraphPlot[{"A" -> "B", "A" -> "a", "B" -> "C", "C" -> "A"}, VertexLabels -> Automatic]GraphPlot[{5 -> 4, 6 -> 2, 6 -> 3, 6 -> 5, 7 -> 1, 7 -> 3, 7 -> 4, 7 -> 6}, VertexLabels -> {All, 3 -> a, 5 -> b}]VertexShapeFunction
GraphPlot[{5 -> 3, 5 -> 4, 6 -> 2, 6 -> 4, 7 -> 1, 7 -> 4, 7 -> 5, 7 -> 6}]GraphPlot[{5 -> 3, 5 -> 4, 6 -> 2, 6 -> 4, 7 -> 1, 7 -> 4, 7 -> 5, 7 -> 6}, VertexShapeFunction -> None]GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 7, 7 -> 8, 8 -> 1, 1 -> 9, 2 -> 9, 3 -> 10, 4 -> 10, 6 -> 11, 5 -> 11, 7 -> 12, 8 -> 12}, VertexShapeFunction -> ({EdgeForm[Black], Yellow, Disk[#1, 0.2], Black, Text[#2, #1]}&)]gr = [image];GraphPlot[{4 -> 2, 4 -> 3, 5 -> 1, 5 -> 3, 6 -> 1, 6 -> 2, 6 -> 4, 6 -> 5}, VertexShapeFunction -> (Inset[gr, #1]&)]GraphicsRow[Table[GraphPlot[{4 -> 3, 5 -> 3, 5 -> 4, 6 -> 3, 6 -> 4, 6 -> 5, 7 -> 1, 7 -> 2, 7 -> 3, 7 -> 4, 7 -> 5, 7 -> 6}, GraphLayout -> {"SpringElectricalEmbedding", "Rotation" -> rot}], {rot, {0, Pi / 2, Pi}}]]Grid[Partition[Table[GraphPlot[{4 -> 3, 5 -> 3, 5 -> 4, 6 -> 3, 6 -> 4, 6 -> 5, 7 -> 1, 7 -> 2, 7 -> 3, 7 -> 4, 7 -> 5, 7 -> 6}, GraphLayout -> {"SpringElectricalEmbedding", "MaxIteration" -> i}, ImageSize -> 50], {i, 15}], {5}]]option name | default value | |
| "EnergyControl" | Automatic | how the energy function is controlled during minimization |
| "InferentialDistance" | Automatic | cutoff distance beyond which the force calculation ignores inference from faraway vertices |
| MaxIterations | Automatic | maximum number of iterations to be used in attempting to minimize the energy |
| "RandomSeed" | Automatic | seed to use in the random generator for initial vertex placement |
| "RecursionMethod" | Automatic | whether a multilevel algorithm is used to lay out the graph |
| "StepControl" | Automatic | how step lengths are modified during energy minimization |
| "StepLength" | Automatic | initial step length used in moving the vertices |
| "Tolerance" | Automatic | tolerance used in terminating the energy minimization process |
"EnergyControl"
"InferentialDistance"
g = RandomInteger[#] -> # + 1& /@ Range[0, 1000];GraphPlot[g, GraphLayout -> "SpringElectricalEmbedding"]GraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "RepulsiveForcePower" -> -2}]GraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "InferentialDistance" -> .5}]MaxIterations
"RandomSeed"
g = {1 -> 3, 1 -> 4, 2 -> 4, 2 -> 5, 3 -> 5, 6 -> 7, 7 -> 8, 8 -> 9, 9 -> 10, 6 -> 10, 1 -> 6, 2 -> 7, 3 -> 8, 4 -> 9, 5 -> 10};GraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "RandomSeed" -> Automatic}, VertexLabels -> Automatic]GraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "RandomSeed" -> 4321}, VertexLabels -> Automatic]"RecursionMethod"
suboption name | default value | |
| "Randomization" | Automatic | whether to inspect vertices in random order |
| "MinSize" | Automatic | minimal number of vertices in a coarsened graph |
| "CoarseningScheme" | Automatic | how graphs are coarsened |
| "MaximalIndependentVertexSet" | link vertices in the maximal independent set if their graph distance is 3 or less |
| "MaximalIndependentVertexSetInjection" | |
link vertices in the maximal independent set if their graph distance is 1 or 2 | |
| "MaximalIndependentVertexSetRugeStuben" | |
generate the maximal independent vertex set, giving priority to vertices with more neighbors not in the set, then link vertices in the set if their graph distance is 3 or less
| |
| "MaximalIndependentVertexSetRugeStubenInjection" | |
link vertices if their graph distance is 1 or 2, giving priority to vertices with more neighbors
| |
| "MaximalIndependentEdgeSet" | consider edges in their natural order when matching |
| "MaximalIndependentEdgeSetHeavyEdge" | |
give priority to edges with higher edge weight (i.e., edges that represent a larger number of edges in the original graph) when matching
| |
| "MaximalIndependentEdgeSetSmallestVertexWeight" | |
give priority to matchings of vertices with neighbors that have the smallest vertex weight | |
"StepControl"
"StepLength"
Tolerance
option name | value | |
| "Octree" | Automatic |
whether to use an octree data structure (in three dimensions) or a quadtree data structure (in two dimensions) in the calculation of repulsive force
|
| "RepulsiveForcePower " | -1 | how fast the repulsive force decays over distance |
"Octree"
"RepulsiveForcePower"
GraphPlot[GridGraph[{20, 20}], GraphLayout -> "SpringElectricalEmbedding"]GraphPlot[GridGraph[{20, 20}], GraphLayout -> {"SpringElectricalEmbedding", "RepulsiveForcePower" -> -2}]Drawing a Graph to Fill Up More Space
SeedRandom[321];g = Table[i -> RandomInteger[{1, 52}], {i, 52}]GraphPlot[g]GraphPlot[g, GraphLayout -> "SpringEmbedding"]GraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "RepulsiveForcePower" -> -1.8}]GraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "InferentialDistance" -> 4}]GraphPlot[g, GraphLayout -> "RadialEmbedding"]GraphPlot[ExampleData[{"Matrix", "HB/1138_bus"}, "Matrix"], GraphLayout -> {"SpringElectricalEmbedding", "InferentialDistance" -> 4, "RepulsiveForcePower" -> -1.8}, PlotRangePadding -> 0]Improving Performance for Drawing Very Large Graphs
g = Import["LinearAlgebraExamples/Data/nos6.mtx"];GraphPlot[g]//TimingGraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "RecursionMethod" -> {"Multilevel", "CoarseningScheme" -> "MaximalIndependentVertexSetRugeStuben"}}]//TimingGraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "MaxIteration" -> 30}]//TimingGraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "InferentialDistance" -> 2, "MaxIteration" -> 40}]//TimingGraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "InferentialDistance" -> 2, "MaxIteration" -> 20}]//TimingGraphPlot[g, GraphLayout -> {"SpringElectricalEmbedding", "InferentialDistance" -> 2, "MaxIteration" -> 20, "RecursionMethod" -> {"Multilevel", "CoarseningScheme" -> "MaximalIndependentVertexSetRugeStuben"}}]//TimingGraphPlot[g, GraphLayout -> "HighDimensionalEmbedding"]//TimingGraphPlot[g, GraphLayout -> "SpringEmbedding"]//TimingE. coli Transcription Networks
Data
g = {{"acrR" -> "acrAB", 2}, {"ada_alkB" -> "aidB", 1}, {"ada_alkB" -> "alkA", 1}, {"adiA_adiY" -> "adiA", 1}, {"alpA" -> "slp", 1}, {"appY" -> "appCBA", 1}, {"araC" -> "araBAD", 3}, {"araC" -> "araE", 3}, {"araC" -> "araFG_araH_1H_2", 3}, {"araC" -> "araJ", 1}, {"arcA" -> "aceBAK", 2}, {"arcA" -> "appCBA", 1}, {"arcA" -> "appY", 1}, {"arcA" -> "betIBA", 2}, {"arcA" -> "cydAB", 1}, {"arcA" -> "cyoABCDE", 2}, {"arcA" -> "dctA", 2}, {"arcA" -> "fadBA", 2}, {"arcA" -> "focA_pflB", 1}, {"arcA" -> "fumA", 2}, {"arcA" -> "fumC", 2}, {"arcA" -> "glcDEFGB", 2}, {"arcA" -> "glpACB", 2}, {"arcA" -> "gltA", 2}, {"arcA" -> "icdA", 2}, {"arcA" -> "lctPRD", 2}, {"arcA" -> "mdh", 2}, {"arcA" -> "nuoABCEFGHIJKLMN", 2}, {"arcA" -> "sdhCDAB_b0725_sucABCD", 2}, {"arcA" -> "sodA", 2}, {"argR" -> "argCBH", 2}, {"argR" -> "argD", 2}, {"argR" -> "argE", 2}, {"argR" -> "argF", 2}, {"argR" -> "argI", 2}, {"argR" -> "carAB", 2}, {"arsR" -> "arsEFG", 2}, {"asnC" -> "asnA", 1}, {"atoC" -> "atoDAB", 1}, {"atoC" -> "atoDAE", 1}, {"betIBA" -> "betT", 2}, {"birA_murA" -> "bioA", 2}, {"birA_murA" -> "bioBFCD", 2}, {"cadC" -> "cadBA", 1}, {"caiF" -> "caiTABCDE", 1}, {"caiF" -> "fixABCX", 1}, {"cbl" -> "ssuEADCB", 1}, {"cbl" -> "tauABCD", 1}, {"cpxAR" -> "cpxP", 1}, {"cpxAR" -> "dsbA", 1}, {"cpxAR" -> "ecfI", 1}, {"cpxAR" -> "htrA", 1}, {"cpxAR" -> "motABcheAW", 2}, {"cpxAR" -> "rotA", 1}, {"cpxAR" -> "skp_lpxDA_fabZ", 1}, {"cpxAR" -> "tsr", 2}, {"cpxAR" -> "xprB_dsbC_recJ", 1}, {"crp" -> "acs", 1}, {"crp" -> "aldB", 1}, {"crp" -> "ansB", 1}, {"crp" -> "araBAD", 1}, {"crp" -> "araC", 1}, {"crp" -> "araE", 1}, {"crp" -> "araFG_araH_1H_2", 1}, {"crp" -> "araJ", 1}, {"crp" -> "caiF", 1}, {"crp" -> "caiTABCDE", 1}, {"crp" -> "cirA", 1}, {"crp" -> "cpdB", 1}, {"crp" -> "cyaA", 2}, {"crp" -> "dadAX", 1}, {"crp" -> "dctA", 2}, {"crp" -> "dcuB_fumB", 2}, {"crp" -> "deoCABD", 3}, {"crp" -> "dsdXA", 1}, {"crp" -> "ebgAC", 1}, {"crp" -> "epd_pgk", 1}, {"crp" -> "fadL", 2}, {"crp" -> "fixABCX", 1}, {"crp" -> "flhDC", 1}, {"crp" -> "focA_pflB", 1}, {"crp" -> "fucAO", 1}, {"crp" -> "fucPIKUR", 1}, {"crp" -> "fur", 1}, {"crp" -> "galETKM", 3}, {"crp" -> "galS", 1}, {"crp" -> "glgCAP", 1}, {"crp" -> "glgS", 1}, {"crp" -> "glnALG", 1}, {"crp" -> "glpACB", 1}, {"crp" -> "glpD", 1}, {"crp" -> "glpFK", 1}, {"crp" -> "glpTQ", 1}, {"crp" -> "gltA", 1}, {"crp" -> "gntKU", 1}, {"crp" -> "gntT", 1}, {"crp" -> "ivbL_ilvBN", 1}, {"crp" -> "lacZYA", 1}, {"crp" -> "malEFG", 1}, {"crp" -> "malI", 2}, {"crp" -> "malK_lamB_malM", 1}, {"crp" -> "malS", 1}, {"crp" -> "malT", 1}, {"crp" -> "malXY", 3}, {"crp" -> "manXYZ", 1}, {"crp" -> "melAB", 1}, {"crp" -> "melR", 1}, {"crp" -> "mglBAC", 1}, {"crp" -> "nagBACD", 1}, {"crp" -> "nagE", 1}, {"crp" -> "nupG", 3}, {"crp" -> "ompA", 2}, {"crp" -> "ppiA", 3}, {"crp" -> "proP", 3}, {"crp" -> "ptsHI_crr", 3}, {"crp" -> "rhaBAD", 3}, {"crp" -> "rhaT", 1}, {"crp" -> "rpoH", 3}, {"crp" -> "sdhCDAB_b0725_sucABCD", 1}, {"crp" -> "speC", 2}, {"crp" -> "srlAEBD_gutM_srlR_gutQ", 1}, {"crp" -> "tdcABCDEFG", 1}, {"crp" -> "tnaLAB", 1}, {"crp" -> "tsx", 3}, {"crp" -> "ubiG", 1}, {"crp" -> "udp", 1}, {"crp" -> "uhpT", 1}, {"crp" -> "yhfA", 3}, {"crp" -> "yiaKLMNOPQRS", 1}, {"csgDEFG" -> "csgBA", 1}, {"cspA" -> "gyrA", 1}, {"cspA" -> "hns", 1}, {"cynR" -> "cynTSX", 1}, {"cysB" -> "cysDNC", 1}, {"cysB" -> "cysJIH", 1}, {"cysB" -> "cysK", 1}, {"cysB" -> "cysPUWAM", 1}, {"cysB" -> "tauABCD", 1}, {"cytR" -> "deoCABD", 2}, {"cytR" -> "nupC", 2}, {"cytR" -> "nupG", 2}, {"cytR" -> "ppiA", 2}, {"cytR" -> "rpoH", 2}, {"cytR" -> "tsx", 3}, {"cytR" -> "udp", 2}, {"deoR" -> "deoCABD", 2}, {"deoR" -> "nupG", 2}, {"deoR" -> "tsx", 2}, {"dnaA" -> "nrdAB", 1}, {"dnaA" -> "rpoH", 2}, {"dsdC" -> "dsdXA", 1}, {"ebgR" -> "ebgAC", 2}, {"envY_ompT" -> "ompC", 1}, {"envY_ompT" -> "ompF", 1}, {"evgA" -> "ompC", 1}, {"exuR" -> "exuT", 2}, {"exuR" -> "uxaCA", 2}, {"exuR" -> "uxuABR", 2}, {"fadR" -> "fabA", 1}, {"fadR" -> "fadBA", 2}, {"fadR" -> "fadL", 2}, {"fadR" -> "iclMR", 2}, {"fadR" -> "uspA", 2}, {"fecIR" -> "fecABCDE", 1}, {"fhlA" -> "fdhF", 1}, {"fhlA" -> "hycABCDEFGH", 1}, {"fhlA" -> "hypABCDE", 1}, {"flhDC" -> "flgAMN", 1}, {"flhDC" -> "flgBCDEFGHIJK", 1}, {"flhDC" -> "flhBAE", 1}, {"flhDC" -> "fliAZY", 1}, {"flhDC" -> "fliE", 1}, {"flhDC" -> "fliFGHIJK", 1}, {"flhDC" -> "fliLMNOPQR", 1}, {"fliAZY" -> "flgBCDEFGHIJK", 1}, {"fliAZY" -> "flgKL", 1}, {"fliAZY" -> "flgMN", 1}, {"fliAZY" -> "flhBAE", 1}, {"fliAZY" -> "fliC", 1}, {"fliAZY" -> "fliDST", 1}, {"fliAZY" -> "fliE", 1}, {"fliAZY" -> "fliFGHIJK", 1}, {"fliAZY" -> "fliLMNOPQR", 1}, {"fliAZY" -> "motABcheAW", 1}, {"fliAZY" -> "tarTapcheRBYZ", 1}, {"fliAZY" -> "tsr", 1}, {"fnr" -> "acs", 1}, {"fnr" -> "ansB", 1}, {"fnr" -> "arcA", 1}, {"fnr" -> "aspA", 1}, {"fnr" -> "caiF", 1}, {"fnr" -> "cydAB", 2}, {"fnr" -> "cyoABCDE", 2}, {"fnr" -> "dcuB_fumB", 1}, {"fnr" -> "dmsABC", 1}, {"fnr" -> "fdnGHI", 1}, {"fnr" -> "focA_pflB", 1}, {"fnr" -> "frdABCD", 1}, {"fnr" -> "glpACB", 1}, {"fnr" -> "hypABCDE", 1}, {"fnr" - ... -> "adhE", 2}, {"narL" -> "caiF", 2}, {"narL" -> "dcuB_fumB", 2}, {"narL" -> "dmsABC", 2}, {"narL" -> "fdnGHI", 1}, {"narL" -> "focA_pflB", 2}, {"narL" -> "frdABCD", 2}, {"narL" -> "narGHJI", 1}, {"narL" -> "narK", 1}, {"narL" -> "nirBDC_cysG", 1}, {"narL" -> "nrfABCDEFG", 1}, {"narL" -> "nuoABCEFGHIJKLMN", 1}, {"narL" -> "torCAD", 2}, {"nhaR" -> "nhaA", 1}, {"nlpD_rpoS" -> "acs", 1}, {"nlpD_rpoS" -> "adhE", 1}, {"nlpD_rpoS" -> "aldB", 1}, {"nlpD_rpoS" -> "alkA", 1}, {"nlpD_rpoS" -> "appY", 1}, {"nlpD_rpoS" -> "cpxAR", 1}, {"nlpD_rpoS" -> "dps", 1}, {"nlpD_rpoS" -> "ftsQAZ", 1}, {"nlpD_rpoS" -> "katG", 1}, {"nlpD_rpoS" -> "narZYWV", 1}, {"nlpD_rpoS" -> "nhaA", 1}, {"nlpD_rpoS" -> "osmC", 1}, {"nlpD_rpoS" -> "osmY", 1}, {"nlpD_rpoS" -> "proP", 1}, {"ompR_envZ" -> "csgBA", 1}, {"ompR_envZ" -> "csgDEFG", 1}, {"ompR_envZ" -> "fadL", 2}, {"ompR_envZ" -> "flhDC", 2}, {"ompR_envZ" -> "ompC", 1}, {"ompR_envZ" -> "ompF", 3}, {"oxyR" -> "ahpCF", 1}, {"oxyR" -> "dps", 1}, {"oxyR" -> "gorA", 1}, {"oxyR" -> "katG", 1}, {"phoBR" -> "phnCDE_f73_phnFGHIJKLMNOP", 1}, {"phoBR" -> "phoA", 1}, {"phoBR" -> "phoE", 1}, {"phoBR" -> "pstSCAB_phoU", 1}, {"pspF" -> "pspABCDE", 1}, {"purR" -> "codBA", 2}, {"purR" -> "cvpA_purF_ubiX", 2}, {"purR" -> "gcvTHP", 2}, {"purR" -> "glnB", 2}, {"purR" -> "glyA", 2}, {"purR" -> "guaBA", 2}, {"purR" -> "prsA", 2}, {"purR" -> "purC", 2}, {"purR" -> "purEK", 2}, {"purR" -> "purHD", 2}, {"purR" -> "purL", 2}, {"purR" -> "purMN", 2}, {"purR" -> "pyrC", 2}, {"purR" -> "pyrD", 2}, {"purR" -> "speA", 2}, {"purR" -> "ycfC_purB", 2}, {"rbsR" -> "rbsDACBK", 2}, {"rcsA" -> "ftsQAZ", 1}, {"rcsA" -> "wza_wzb_b2060_wcaA_wcaB", 1}, {"rhaSR" -> "rhaBAD", 1}, {"rhaSR" -> "rhaT", 1}, {"rob" -> "aslB", 1}, {"rob" -> "fumC", 1}, {"rob" -> "galETKM", 2}, {"rob" -> "inaA", 1}, {"rob" -> "marRAB", 1}, {"rob" -> "mdlA", 1}, {"rob" -> "nfo", 1}, {"rob" -> "sodA", 1}, {"rob" -> "ybaO", 1}, {"rob" -> "ybiS", 1}, {"rob" -> "yfhD", 1}, {"rob" -> "zwf", 1}, {"rpiR_alsBACEK" -> "rpiB", 2}, {"rpoE_rseABC" -> "cutC", 1}, {"rpoE_rseABC" -> "dapA_nlpB_purA", 1}, {"rpoE_rseABC" -> "ecfABC", 1}, {"rpoE_rseABC" -> "ecfD", 1}, {"rpoE_rseABC" -> "ecfF", 1}, {"rpoE_rseABC" -> "ecfG", 1}, {"rpoE_rseABC" -> "ecfH", 1}, {"rpoE_rseABC" -> "ecfI", 1}, {"rpoE_rseABC" -> "ecfJ", 1}, {"rpoE_rseABC" -> "ecfK", 1}, {"rpoE_rseABC" -> "ecfLM", 1}, {"rpoE_rseABC" -> "fkpA", 1}, {"rpoE_rseABC" -> "htrA", 1}, {"rpoE_rseABC" -> "ksgA_epaG_epaH", 1}, {"rpoE_rseABC" -> "lpxDA_fabZ", 1}, {"rpoE_rseABC" -> "mdoGH", 1}, {"rpoE_rseABC" -> "nlpB_purA", 1}, {"rpoE_rseABC" -> "ostA_surA_pdxA", 1}, {"rpoE_rseABC" -> "rfaDFCL", 1}, {"rpoE_rseABC" -> "rpoD", 1}, {"rpoE_rseABC" -> "rpoH", 1}, {"rpoE_rseABC" -> "skp_lpxDA_fabZ", 1}, {"rpoE_rseABC" -> "uppS_cdsA_ecfE", 1}, {"rpoE_rseABC" -> "xprB_dsbC_recJ", 1}, {"rpoH" -> "clpP", 1}, {"rpoH" -> "dnaKJ", 1}, {"rpoH" -> "grpE", 1}, {"rpoH" -> "hflB", 1}, {"rpoH" -> "htpG", 1}, {"rpoH" -> "htpY", 1}, {"rpoH" -> "ibpAB", 1}, {"rpoH" -> "lon", 1}, {"rpoH" -> "mopA", 1}, {"rpoH" -> "mopB", 1}, {"rpoN" -> "atoC", 1}, {"rpoN" -> "dctA", 1}, {"rpoN" -> "fdhF", 1}, {"rpoN" -> "fhlA", 1}, {"rpoN" -> "glnALG", 1}, {"rpoN" -> "glnHPQ", 1}, {"rpoN" -> "hycABCDEFGH", 1}, {"rpoN" -> "hypA", 1}, {"rpoN" -> "nac", 1}, {"rpoN" -> "nycA", 1}, {"rpoN" -> "pspABCDE", 1}, {"rpoN" -> "rtcR", 1}, {"rpoN" -> "zraP", 1}, {"rtcR" -> "rtcAB", 2}, {"soxR" -> "soxS", 1}, {"soxS" -> "acnA", 1}, {"soxS" -> "fpr", 1}, {"soxS" -> "fumC", 1}, {"soxS" -> "nfo", 1}, {"soxS" -> "sodA", 1}, {"soxS" -> "zwf", 1}, {"tdcAR" -> "tdcABCDEFG", 1}, {"torR" -> "torCAD", 1}, {"treR" -> "treBC", 2}, {"trpR" -> "aroH", 2}, {"trpR" -> "aroL_yaiA_aroM", 2}, {"trpR" -> "mtr", 2}, {"trpR" -> "trpLEDCBA", 2}, {"tyrR" -> "aroF_tyrA", 2}, {"tyrR" -> "aroG", 2}, {"tyrR" -> "aroL_yaiA_aroM", 2}, {"tyrR" -> "aroP", 2}, {"tyrR" -> "mtr", 1}, {"tyrR" -> "tyrB", 2}, {"tyrR" -> "tyrP", 3}, {"uhpA" -> "uhpT", 1}, {"uidR" -> "uidRABC", 2}, {"uxuABR" -> "uidRABC", 2}, {"xapR" -> "xapAB", 1}, {"xylFGHR" -> "xylAB", 1}, {"yhdG_fis" -> "adhE", 1}, {"yhdG_fis" -> "alaWX", 1}, {"yhdG_fis" -> "aldB", 3}, {"yhdG_fis" -> "argU", 1}, {"yhdG_fis" -> "argW", 1}, {"yhdG_fis" -> "argX_hisR_leuT_proM", 1}, {"yhdG_fis" -> "aspV", 1}, {"yhdG_fis" -> "leuQPV", 1}, {"yhdG_fis" -> "leuX", 1}, {"yhdG_fis" -> "lysT_valT_lysW", 1}, {"yhdG_fis" -> "metT_leuW_glnUW_metU_glnVX", 1}, {"yhdG_fis" -> "metY_yhbC_nusA_infB", 1}, {"yhdG_fis" -> "nrdAB", 1}, {"yhdG_fis" -> "pdhR_aceEF_lpdA", 1}, {"yhdG_fis" -> "pheU", 1}, {"yhdG_fis" -> "pheV", 1}, {"yhdG_fis" -> "proK", 1}, {"yhdG_fis" -> "proL", 1}, {"yhdG_fis" -> "proP", 1}, {"yhdG_fis" -> "sdhCDAB_b0725_sucABCD", 1}, {"yhdG_fis" -> "serT", 1}, {"yhdG_fis" -> "serX", 1}, {"yhdG_fis" -> "thrU_tyrU_glyT_thrT", 1}, {"yhdG_fis" -> "thrW", 1}, {"yhdG_fis" -> "tyrTV", 1}, {"yhdG_fis" -> "valUXY_lysV", 1}, {"yiaJ" -> "yiaKLMNOPQRS", 2}, {"yjbK" -> "znuABC", 2}, {"yjdHG" -> "dctA", 1}, {"yjdHG" -> "dcuB_fumB", 1}, {"yjdHG" -> "frdABCD", 1}, {"zntR" -> "zntA", 1}};Drawing the Network
GraphPlot[g, EdgeLabels -> None]GraphPlot[g, EdgeLabels -> None, GraphLayout -> {"PackingLayout" -> "ClosestPackingCenter"}]GraphPlot[g, EdgeLabels -> None, GraphLayout -> {"SpringElectricalEmbedding", "RepulsiveForcePower" -> -2}]GraphPlot[g, EdgeLabels -> None, GraphLayout -> {"SpringElectricalEmbedding", "InferentialDistance" -> .5}]Protein: An Oxidoreductase
GraphPlot[{{1 -> 2, 1}, {1 -> 9, 2}, {1 -> 17, 2}, {2 -> 3, 1}, {2 -> 9, 2}, {3 -> 49, 2}, {4 -> 5, 2}, {4 -> 42, 2}, {5 -> 6, 2}, {5 -> 9, 2}, {5 -> 17, 2}, {5 -> 42, 1}, {6 -> 7, 1}, {6 -> 8, 2}, {6 -> 17, 2}, {6 -> 28, 2}, {6 -> 42, 2}, {7 -> 8, 2}, {7 -> 16, 2}, {7 -> 28, 2}, {7 -> 44, 2}, {8 -> 10, 2}, {8 -> 11, 2}, {8 -> 14, 2}, {8 -> 16, 2}, {8 -> 18, 2}, {8 -> 19, 2}, {8 -> 28, 2}, {9 -> 17, 2}, {10 -> 11, 1}, {10 -> 12, 2}, {10 -> 13, 2}, {10 -> 14, 2}, {10 -> 17, 2}, {10 -> 18, 2}, {11 -> 12, 2}, {11 -> 18, 2}, {12 -> 13, 2}, {12 -> 14, 2}, {12 -> 18, 2}, {13 -> 14, 2}, {13 -> 15, 2}, {13 -> 16, 2}, {13 -> 18, 2}, {13 -> 32, 2}, {14 -> 15, 1}, {14 -> 16, 2}, {14 -> 18, 2}, {14 -> 32, 1}, {14 -> 36, 2}, {15 -> 16, 2}, {15 -> 32, 2}, {15 -> 36, 2}, {15 -> 37, 2}, {16 -> 17, 2}, {16 -> 18, 2}, {16 -> 32, 2}, {16 -> 33, 2}, {16 -> 37, 2}, {18 -> 19, 2}, {19 -> 20, 2}, {19 -> 43, 2}, {20 -> 21, 2}, {20 -> 43, 2}, {21 -> 22, 2}, {22 -> 27, 2}, {22 -> 28, 2}, {22 -> 29, 2}, {23 -> 24, 2}, {23 -> 25, 2}, {23 -> 26, 2}, {23 -> 27, 2}, {23 -> 30, 2}, {23 -> 31, 2}, {23 -> 39, 2}, {24 -> 25, 2}, {24 -> 31, 2}, {24 -> 39, 2}, {25 -> 26, 2}, {25 -> 31, 2}, {26 -> 27, 2}, {26 -> 30, 2}, {26 -> 31, 2}, {26 -> 32, 2}, {27 -> 30, 2}, {28 -> 29, 2}, {29 -> 85, 2}, {30 -> 31, 2}, {30 -> 32, 2}, {30 -> 33, 2}, {32 -> 36, 2}, {32 -> 85, 2}, {33 -> 36, 2}, {35 -> 36, 2}, {35 -> 79, 2}, {35 -> 82, 2}, {36 -> 37, 2}, {37 -> 38, 2}, {39 -> 40, 2}, {39 -> 41, 2}, {39 -> 47, 2}, {40 -> 41, 2}, {40 -> 46, 2}, {40 -> 48, 2}, {43 -> 44, 2}, {44 -> 45, 1}, {45 -> 46, 1}, {47 -> 48, 2}, {50 -> 51, 1}, {50 -> 52, 2}, {50 -> 59, 1}, {50 -> 67, 2}, {51 -> 52, 2}, {51 -> 59, 2}, {51 -> 67, 2}, {52 -> 53, 1}, {53 -> 93, 2}, {53 -> 99, 2}, {54 -> 55, 2}, {54 -> 92, 2}, {55 -> 56, 2}, {55 -> 59, 2}, {55 -> 67, 2}, {55 -> 92, 1}, {56 -> 57, 1}, {56 -> 58, 2}, {56 -> 67, 2}, {56 -> 78, 2}, {56 -> 92, 2}, {57 -> 58, 2}, {57 -> 66, 2}, {57 -> 78, 2}, {57 -> 94, 2}, {58 -> 60, 2}, {58 -> 61, 2}, {58 -> 64, 2}, {58 -> 66, 2}, {58 -> 68, 2}, {58 -> 69, 2}, {58 -> 78, 2}, {59 -> 67, 2}, {60 -> 61, 2}, {60 -> 62, 2}, {60 -> 64, 2}, {60 -> 67, 2}, {60 -> 68, 2}, {61 -> 62, 2}, {61 -> 68, 2}, {62 -> 63, 2}, {62 -> 68, 2}, {63 -> 64, 2}, {63 -> 65, 2}, {63 -> 66, 2}, {63 -> 68, 2}, {63 -> 82, 2}, {64 -> 65, 1}, {64 -> 66, 2}, {64 -> 68, 2}, {64 -> 82, 1}, {64 -> 86, 2}, {65 -> 66, 2}, {65 -> 82, 2}, {65 -> 86, 2}, {65 -> 87, 2}, {66 -> 67, 2}, {66 -> 68, 2}, {66 -> 82, 2}, {66 -> 83, 2}, {66 -> 87, 2}, {68 -> 69, 2}, {69 -> 70, 2}, {69 -> 93, 2}, {70 -> 71, 2}, {71 -> 72, 2}, {72 -> 77, 2}, {72 -> 78, 2}, {72 -> 79, 2}, {73 -> 74, 2}, {73 -> 75, 2}, {73 -> 76, 2}, {73 -> 77, 2}, {73 -> 80, 2}, {73 -> 81, 2}, {73 -> 89, 2}, {74 -> 75, 2}, {74 -> 81, 2}, {74 -> 89, 2}, {75 -> 76, 2}, {75 -> 81, 2}, {76 -> 77, 2}, {76 -> 80, 2}, {76 -> 81, 2}, {76 -> 82, 2}, {77 -> 80, 2}, {78 -> 79, 2}, {80 -> 81, 2}, {80 -> 82, 2}, {80 -> 83, 2}, {82 -> 86, 2}, {85 -> 86, 2}, {86 -> 87, 2}, {87 -> 88, 2}, {89 -> 90, 2}, {89 -> 91, 2}, {89 -> 97, 2}, {90 -> 91, 2}, {90 -> 96, 2}, {90 -> 98, 2}, {93 -> 94, 2}, {94 -> 95, 1}, {95 -> 96, 1}, {97 -> 98, 2}}, EdgeLabels -> None, MultiedgeStyle -> False]Social Network
GraphPlot[{"Li" -> "Hu", "Wang" -> "Hu", "Li" -> "Wang", "Carol" -> "Andre", "Carol" -> "Fernando", "Carol" -> "Diane", "Andre" -> "Diane", "Andre" -> "Fernando", "Andre" -> "Beverly", "Fernando" -> "Diane", "Fernando" -> "Garth", "Fernando" -> "Heather", "Diane" -> "Beverly", "Diane" -> "Garth", "Diane" -> "Ed", "Beverly" -> "Garth", "Beverly" -> "Ed", "Garth" -> "Ed", "Garth" -> "Heather", "Jane" -> "Li", "Jane" -> "Hu", "Heather" -> "Ike", "Ike" -> "Jane", "Li" -> "Yang", "Yang" -> "Liu", "Liu" -> "Wang"}, VertexLabels -> Automatic, PlotRangePadding -> Automatic]Graphs from Words and Texts
words = DictionaryLookup["din*"];nearbys = Flatten[Map[(Thread[# -> DeleteCases[Nearest[words, #, 3], #]])&, words]];GraphPlot[nearbys, GraphLayout -> {"SpringElectricalEmbedding", "RepulsiveForcePower" -> -3}, VertexShapeFunction -> (Text[#2, #1, Background -> White]&)]WordPlot[w_String] := GraphPlot[(x = Characters[w];
Thread[Drop[x, -1] -> Drop[x, 1]]), VertexLabels -> Automatic, DirectedEdges -> True];WordPlot["Shakespeare"]TextPlot[w_String] := GraphPlot[(x = Map[ToLowerCase, StringCases[w, WordCharacter..]];
g = Thread[Drop[x, -1] -> Drop[x, 1]];
g), DirectedEdges -> True, VertexLabels -> Automatic];TextPlot["to be or not to be, that is the question."]Torus
torus[m_, n_] :=
SparseArray[
Flatten[Table[{{i * n + j + 1, Mod[i + 1, m] * n + j + 1} ->
1, {i * n + j + 1, Mod[i - 1, m] * n + j + 1} ->
1, {i * n + j + 1, i * n + Mod[j + 1, n] + 1} ->
1, {i * n + j + 1, i * n + Mod[j - 1, n] + 1} -> 1}, {i, 0,
m - 1}, {j, 0, n - 1}]], {m * n, m * n}];GraphPlot3D[torus[40, 40], VertexShapeFunction -> None][1] Milo, R., S. Shen-Orr, S. Itzkovitz, N. Kashtan, D. Chklovskii, and U. Alon. "Network Motifs: Simple Building Blocks of Complex Networks." Science 298, no. 5594 (2002): 824–827.
[2] Alon, U. "Collection of Complex Networks." Uri Alon Homepage 2007.
[3] Milo, R., S. Itzkovitz, N. Kashtan, et al. "Superfamilies of Designed and Evolved Networks." Science 303, no. 5663 (2004): 1538–1542.
[4] Alon, U. "1AORInter." network Motifs 2007.
[5] National Institute of Standards and Technology. "DWA512: Square Dielectric Waveguide." Matrix Market 2007.
[6] Freivalds, K., U. Dogrusoz, and P. Kikusts, "Disconnected Graph Layout and the Polyomino Packing Approach." Lecture Notes in Computer Science: Revised Papers from the 9th International Symposium on Graph Drawing 2265 (2001): 378–391.
[7] Hu, Y. F. "Graph Drawing of Square Matrices from University of Florida Sparse Matrix Collection." (2007).
[8] Hu, Y. F. "Efficient, High-Quality Force-Directed Graph Drawing." The Mathematica Journal 10, no. 1 (2006): 37–71.