As of Version 10, most of the functionality of the Combinatorica package is built into the Wolfram System. >>
represents a graph object where is the list of edges annotated with graphics options, is a list of vertices annotated with graphics options, and opts is a set of global graph options.
Details and Options
- Graph functionality is now available in the built-in Wolfram Language function Graph.
- To use Graph, you first need to load the Combinatorica Package using Needs["Combinatorica`"].
- has the form , where , , … are edges of the graph and , , … are options that respectively apply to these edges.
- has the form , where , , … respectively denote the coordinates in the plane of vertex 1, vertex 2, … and , , … are options that respectively apply to these vertices.
- Permitted edge options are EdgeWeight, EdgeColor, EdgeStyle, EdgeLabel, EdgeLabelColor, and EdgeLabelPosition.
- Permitted vertex options are VertexWeight, VertexColor, VertexStyle, VertexNumber, VertexNumberColor, VertexNumberPosition, VertexLabel, VertexLabelColor, and VertexLabelPosition.
- The third item in a Graph object is opts, a sequence of zero or more global options that apply to all vertices or all edges or to the graph as a whole.
- All edge options and vertex options can be used as global options also.
- If a global option and a local edge option or vertex option differ, then the local edge or vertex option is used for that particular edge or vertex.
- In addition to these options, the following two options can be specified as part of the global options: LoopPosition and EdgeDirection.
- Furthermore, all the options of the Wolfram Language function Plot can be used as global options in a Graph object. These can be used to specify how the graph looks when it is drawn.
- Also, all options of the graphics primitive Arrow can also be specified as part of global graph options. These can be used to affect the look of arrows that represent directed edges.
- See the usage message of individual options to find out more about values these options can take on.
- Whether a graph is undirected or directed is given by the option EdgeDirection. This has default value False. For undirected graphs, the edges , , … have to satisfy , , … and for directed graphs the edges , , … are treated as ordered pairs, each specifying the direction of the edge as well.