Get Math Help

GET TUTORING NEAR ME!

By submitting the following form, you agree to Club Z!'s Terms of Use and Privacy Policy

    Function Graph

    Usage

    Graph[{e1, e2, ...}] yields a graph with edges ej.
Graph[{v1, v2, ...}, {e1, e2, ...}] yields the graph with vertices vi and edges ej. 
Graph[{..., wi[vi, ...], ...}, {..., wj[ej, ...], ...}] yields a graph with vertex and edge properties defined by the symbolic wrappers wk.
Graph[data] yields a graph from data.

    Basic examples

    An undirected graph:
In[1]:=Graph[{1<->2, 2<->3, 3<->1}]
Out[1]=
A directed graph:
In[1]:=Graph[{1->2, 2->3, 3->1}]
Out[1]=
Style vertices and edges:
In[1]:=Graph[{1<->2, 2<->3, 3<->1}, VertexStyle->Orange, EdgeStyle->Green]
Out[1]=
Use wrappers to input directly:
In[2]:=Graph[{1, 2, Style[3, Red]}, {1<->2, 2<->3, Style[3<->1, Blue]}]
Out[2]=

    Options

    AlignmentPoint | AnnotationRules | AspectRatio | Axes | AxesLabel | AxesOrigin | AxesStyle | Background | BaselinePosition | BaseStyle | ContentSelectable | DirectedEdges | EdgeCapacity | EdgeCost | EdgeLabels | EdgeLabelStyle | EdgeShapeFunction | EdgeStyle | EdgeWeight | Editable | Epilog | FormatType | Frame | FrameLabel | FrameStyle | FrameTicks | FrameTicksStyle | GraphHighlight | GraphHighlightStyle | GraphLayout | GraphRoot | GraphStyle | GridLines | GridLinesStyle | ImageMargins | ImagePadding | ImageSize | LabelStyle | PerformanceGoal | PlotLabel | PlotRange | PlotRangeClipping | PlotRangePadding | PlotRegion | PlotTheme | Prolog | Properties | RotateLabel | Ticks | TicksStyle | VertexCapacity | VertexCoordinates | VertexLabels | VertexLabelStyle | VertexShape | VertexShapeFunction | VertexSize | VertexStyle | VertexWeight

    Common option values

    EdgeCapacity | {2, 3, 4}
PlotTheme | "Web" | "Minimal" | "Detailed" | "Business" | "Marketing" | "Scientific" | "Monochrome" | "Classic" | "Default" | "LargeGraph" | "ClassicLabeled" | "IndexLabeled" | "BackgroundColor" | "BoldColor" | "CoolColor" | "DarkColor" | "GrayColor" | "NeonColor" | "PastelColor" | "RoyalColor" | "VibrantColor" | "WarmColor" | "BoldLabels" | "ItalicLabels" | "LargeLabels" | "SmallLabels" | "SansLabels" | "SerifLabels"
VertexCapacity | {2, 3, 4}

    Attributes

    NHoldAll | Protected

    Relationships with other entities

    TreeGraph | PathGraph | AdjacencyGraph | IncidenceGraph | GraphData | Graph3D

    Relationships with other entities

    Typical ranks of usage in programs

    303rd most common (1 in 10200 symbols)

    417th most common (1 in 20000 symbols)

    71st most common (1 in 858 symbols)

    History

    introduced in Version 8 (November 2010)
last modified in Version 13.1 (June 2022)

    Timeline

    Timeline

    Find the right fit or it’s free.

    We guarantee you’ll find the right tutor, or we’ll cover the first hour of your lesson.