|
SOLUTIONS
|
-
Functions
- AdjacencyGraph
- ButterflyGraph
- ChemicalData
- CirculantGraph
- CompleteGraph
- CompleteKaryTree
- CountryData
- CycleGraph
- DeBruijnGraph
- DirectedEdge
- EdgeAdd
- ExampleData
- Graph
- GraphData
- GraphPropertyDistribution
- GraphUnion
- GridGraph
- HararyGraph
- HypercubeGraph
- Import
- IncidenceGraph
- IsotopeData
- KaryTree
- KirchhoffGraph
- KnightTourGraph
- NeighborhoodGraph
- PathGraph
- PetersenGraph
- PolyhedronData
- RandomGraph
- SocialMediaData
- StarGraph
- Subgraph
- TreeGraph
- TuranGraph
- UndirectedEdge
- UniformGraphDistribution
- VertexAdd
- WeightedAdjacencyGraph
- WheelGraph
- WordData
- Related Guides
Constructing Graphs
In Mathematica, graphs can be constructed in a variety of ways. They can be built from vertices and edges directly in a symbolic form. They can come from built-in curated collections of theoretical or empirical graphs. Special graphs can be generated from parametric specifications. Random graphs following a variety of graph distributions allow you to build simulated internets or citation graphs and test algorithms. Graphs can be fully specified by several types of matrices, or they can be imported from numerous supported file formats. Graphs can also be constructed in several steps by performing operations on graphs.
Featured ExamplesFeatured Examples |
-
Apply Options of One Graph to Another
-
Build Semantic Networks
-
Color Cycle Decompositions
-
Convert to Matrix Representations of Graphs
-
Create Molecular Graphs
-
Custom Vertex and Edge Labeling
-
Find an Isomorphism that Maps Two Graphs
-
Highlight Graph Elements on BFS and DFS Trees
-
Pack Disconnected Components
-
Perform a Breadth-First Scan of a Graph
-
Perform a Depth-First Scan of a Graph
ReferenceReference
Graph — construct a graph from vertices and edges
UndirectedEdge (
) ▪ DirectedEdge (
)
Curated Graphs
GraphData — collection of theoretical graphs
ExampleData — collection of empirical graphs
SocialMediaData — graph data from social sites (Facebook, Twitter, ...)
PolyhedronData ▪ ChemicalData ▪ WordData ▪ CountryData ▪ IsotopeData
Parametric Graphs
CompleteGraph — generate a complete or a complete
-partite graph
ButterflyGraph ▪ CirculantGraph ▪ CompleteKaryTree ▪ CycleGraph ▪ DeBruijnGraph ▪ GridGraph ▪ HararyGraph ▪ HypercubeGraph ▪ KaryTree ▪ KnightTourGraph ▪ PathGraph ▪ PetersenGraph ▪ StarGraph ▪ TreeGraph ▪ TuranGraph ▪ WheelGraph
Random Graphs »
RandomGraph — generate random graphs following a graph distribution
GraphPropertyDistribution ▪ UniformGraphDistribution ▪ ...
Matrix Graphs »
AdjacencyGraph — construct a graph from an adjacency matrix
IncidenceGraph ▪ KirchhoffGraph ▪ WeightedAdjacencyGraph ▪ ...
Importing Graphs »
Import — import graphs from different graph file formats
"GraphML" ▪ "GXL" ▪ "Graphlet" ▪ "Pajek" ▪ "TGF" ▪ "DOT" ▪ ...
Operations and Modifications of Graphs »
Subgraph — extract subgraphs
NeighborhoodGraph ▪ GraphUnion ▪ VertexAdd ▪ EdgeAdd ▪ ...
