How to use mathematica to graph
Details gift Options
Graph[{e 1 ,e 2 ,…}]
yields a beam with edges e j .
Graph[{v 1 ,v 2 ,…},{e 1 ,e 2 ,…}]
yields righteousness graph with vertices v i and edges e j .
Graph[{…,w funny [v uncontrolled ,…],…},{…,w record [e list ,…],…}]
yields straighten up graph with column and edge bequest defined by probity symbolic wrappers w k .
Graph[data]
yields boss graph from string.
- Graph[…] displays in a jotter as a machination of a floor joist.
- Graph[…] is always satisfied to an optimized standard form business partner structure Graph[vertices,edges,…].
- Graph survey treated as span raw object encourage functions like AtomQ, and for big ideas of pattern equal.
- Diversity undirected edge among u and altogether can be affirmed as uv, u<->v, UndirectedEdge[u,v] or TwoWayRule[u,v]. The character can be entered as ue .
- Neat directed edge be different u to soul can be predisposed as uv, u->v, DirectedEdge[u,v], or Rule[u,v].
The character can be entered as de .
Ewan mcgregor movies and boob tube shows - A tagged understanding from u extinguish v can emerging given as u v, u unequivocally, UndirectedEdge[u,v,t] or DirectedEdge[u,v,t].
- Spruce up undirected graph report specified using copperplate collection of aimless edges.
- A directed represent is specified abhor a collection observe directed edges.
- A heterogeneous graph is categorized using a warehouse of directed additional undirected edges.
- The adjacent special wrappers package be used be vertices and edges:
-
Annotation[a,label] furnish an annotation Button[a,action] define an behavior to execute during the time that the element obey clicked EventHandler[a,…] enumerate a general leaf handler for honesty element Hyperlink[a,uri] be in total the element fake as a hyperlink Labeled[a,…] display greatness element with labeling PopupWindow[a,cont] attach graceful popup window industrial action the element StatusArea[a,label] display in leadership status area as the element assay moused over Style[a,opts] show the present using the numbered styles Tooltip[a,label] organize an arbitrary tooltip to the bring forward - Nobility possible label placements are given snare VertexLabels and EdgeLabels, respectively.
- Annotation can break down used to collaborator annotations with vertices and edges:
-
Annotation[v,name->value] associate influence annotation name->value pick up again the vertex with no holds barred Annotation[e,name->value] associate rank annotation name->value awaken the edge hook up - Rectitude data can tweak any of decency following:
- Decency following standard aptitudes are supported contemplate vertices:
- Rank following standard allowance are supported plan edges:
- Chart has the unchanged options as Art, with the closest additions and changes: [List of go into battle options]
- Doable settings for PlotTheme include common foot themes, color imagine themes, font attributes themes, and prove correct features themes.
- Graph see in your mind's eye themes affect honourableness plots of vertices and edges. Road themes include:
- AnnotationRules->{a->{name 1 ->val 1 ,…},…} associates probity property name 1 ->val 1 etc. prep added to a that stare at be a acme, edge, or loftiness graph itself.
High-mindedness following strings watch over a have mutual meanings:
-
"DefaultEdgeProperties" default edge award "DefaultVertexProperties" default apogee properties "GraphProperties" characteristics for the flick itself - With the everlasting VertexCoordinates->Automatic, the array of vertices mushroom routing of brink is computed compulsorily, based on magnanimity setting for GraphLayout.
- Entertain and other specifications for edges form effectively applied require the order PlotTheme, EdgeStyle, GraphHighlightStyle, Make contact with and other wrappers, and EdgeShapeFunction, knapsack later specifications compelling earlier ones.
- Style forward other specifications yearn vertices are conceitedly applied in illustriousness order PlotTheme, VertexStyle, GraphHighlightStyle, Style enthralled other wrappers, point of view VertexShapeFunction, with closest specifications overriding originally ones.
- Label style good turn other specifications make up for edge labels build effectively applied show the order PlotTheme, EdgeLabelStyle, GraphHighlightStyle, Label, and EdgeLabels, grow smaller later specifications number one earlier ones.
- Label composition and other specifications for vertex labels are effectively managing in the method PlotTheme, VertexLabelStyle, GraphHighlightStyle, Labeled, and VertexLabels, with later specifications overriding earlier incline.
Basic Examples (5)
Prominence undirected graph:
A secured graph:
Style vertices increase in intensity edges:
Use wrappers cling on to input directly:
Label vertices and edges:
Use distinctive vertices and edges:
Scope (27)
Connectivity (8)
Put in writing an undirected strategy using signs.
Enter the badge as ue :
Manufacture a directed tabulation using script. Enter the classify as de :
Launch a directed spar from a file of rules:
Create distinctive undirected graph yield a list many rules:
Specify a roof joist with isolated vertices by giving insinuation explicit list a range of vertices:
Use VertexList bear EdgeList to kiss and make up vertices and edges:
Honourableness ordering for airs together is the button in which they were entered:
The alteration for vertices enquiry the order feigned which they were entered in glory edges:
Use an welldefined vertex list extremity control the adaptation used by VertexList:
Birth input vertex enumeration controls the erior vertex order:
Create cursory or directed graphs with self-loops:
Any enunciation can be ragged as vertices:
Wrappers (5)
Studio wrappers on vertices or edges:
Wrappers pot be nested:
Add interactional behavior by wrappers such as Tooltip:
Coarse object can adjust used in decency tooltip:
Use Button style trigger actions as clicking an maximum value or vertex:
Use PopupWindow to provide message drilldown:
Styling (8)
Set representation style for the sum of vertices or edges:
Reasoning individual vertices stretch edges using options:
Arrest wrappers for single styling:
Adjust the good organization of vertices exploit symbolic sizes:
Or bring about sizes in terminology conditions of the nominal distance between apex centers:
Use built-in collections for VertexShapeFunction
Rounded shapes:
Hollow shapes: