PlanarGraph[{e1,e2,…}]
辺 ejを持つ平面グラフを与える.
PlanarGraph[{v1,v2,…},{e1,e2,…}]
頂点 viと辺 ejを持つ平面グラフを与える.
PlanarGraph[{…,wi[vi],…},{…,wj[ej],…}]
頂点と辺の特性が記号ラッパー wkで定義された平面グラフを与える.
PlanarGraph[{vivj,…}]
規則 vivjを使って平面グラフを指定する.
PlanarGraph
PlanarGraph[{e1,e2,…}]
辺 ejを持つ平面グラフを与える.
PlanarGraph[{v1,v2,…},{e1,e2,…}]
頂点 viと辺 ejを持つ平面グラフを与える.
PlanarGraph[{…,wi[vi],…},{…,wj[ej],…}]
頂点と辺の特性が記号ラッパー wkで定義された平面グラフを与える.
PlanarGraph[{vivj,…}]
規則 vivjを使って平面グラフを指定する.
詳細とオプション
- PlanarGraphはGraphオブジェクトを生成する.
- 平面に辺の交差なしで描けるグラフは平面グラフである.
- PlanarGraphは,可能な場合は平面埋込みを使ってグラフを表示する.
- PlanarGraphは,Graphと同じ頂点,辺,ラッパーをサポートする.
- PlanarGraphには,Graphと同じオプションに,"PlanarEmbedding"と"TutteEmbedding"に限定されたGraphLayoutメソッドを加えたものが使える.
例題
すべて開く すべて閉じる例 (2)
PlanarGraph[{12, 13, 14, 23, 24, 34}]三次元HypercubeGraphは平面グラフである:
g = HypercubeGraph[3]PlanarGraphQ[g]PlanarGraph[EdgeList[g]]スコープ (25)
接続性 (6)
PlanarGraph[{12, 13, 14, 23, 24, 34}]PlanarGraph[{12, 13, 14, 23, 24, 34}]PlanarGraph[{1 -> 2, 1 -> 3, 1 -> 4, 2 -> 3, 2 -> 4, 3 -> 4}]PlanarGraph[{1 -> 2, 1 -> 3, 1 -> 4, 2 -> 3, 2 -> 4, 3 -> 4}, DirectedEdges -> False]VertexListとEdgeListを使って頂点と辺を得る:
{g1, g2} = {PlanarGraph[{12, 13, 14, 23, 24, 34}], PlanarGraph[{34, 12, 13, 14, 23, 24}]}EdgeList /@ {g1, g2}VertexList /@ {g1, g2}明示的な頂点リストでVertexListが使う順序を制御する:
{g1, g2} = {PlanarGraph[{1, 2, 3, 4}, {12, 13, 14, 23, 24, 34}], PlanarGraph[{3, 2, 1, 4}, {12, 13, 14, 23, 24, 34}]}VertexList /@ {g1, g2}{PlanarGraph[{ab, ac, bc}], PlanarGraph[{"foo""bar", "foo""gnu", "bar""gnu"}],
PlanarGraph[{[image][image], [image][image], [image][image]}]}VertexList /@ %ラッパー (5)
{PlanarGraph[{Style[1, Red], 2, 3, 4}, {12, 13, 14, 23, 24, 34}], PlanarGraph[{1, 2, 3, 4}, {Style[12, Red], 13, 14, 23, 24, 34}]}{PlanarGraph[{Labeled[Style[1, Red], "hello"], 2, 3, 4}, {12, 13, 14, 23, 24, 34}], PlanarGraph[{1, 2, 3, 4}, {Style[Labeled[12, "hello"], Red], 13, 14, 23, 24, 34}]}Tooltipのようなラッパーでインタラクティブな動作を加える:
PlanarGraph[{12, 13, 14, 23, 24, Tooltip[Style[34, Red], "hello"]}]PlanarGraph[{12, 13, 14, 23, 24, Tooltip[Style[34, Red], Plot[Sin[x], {x, 0, 2Pi}]]}]Buttonを使って辺または頂点がクリックされたときにアクションを引き起こすことができる:
{PlanarGraph[{12, 13, 14, Button[Style[23, Red], Speak["Edge from 1 to 3"]], 24, 34}], PlanarGraph[{1, 2, Button[Style[3, Red], Speak["Vertex 3"]]}, {12, 13, 14, 23, 24, 34}, VertexSize -> Medium]}PopupWindowを使ってドリルダウン情報を与えることができる:
PlanarGraph[{12, 13, 14, 23, 24, PopupWindow[Style[34, Red], DateListPlot[FinancialData["IBM", "Jan. 1, 2004"]]]}]スタイル付け (8)
{PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexStyle -> Green], PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeStyle -> Green]}{PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexStyle -> {1 -> Green, Orange}], PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeStyle -> {12 -> Green, Orange}]}{PlanarGraph[{Style[1, Green], 2, 3}, {12, 13, 14, 23, 24, 34}, VertexStyle -> Orange], PlanarGraph[{Style[12, Green], 13, 14, 23, 24, 34}, EdgeStyle -> Orange]}Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> s, PlotLabel -> s], {s, {Tiny, Small, Medium, Large}}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> s, PlotLabel -> s], {s, {0.1, 0.2, 0.5, 1}}]VertexShapeFunctionの組込みコレクション使う:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> s, VertexSize -> 0.2, PlotLabel -> s], {s, {"Triangle", "Square", "Rectangle", "Pentagon", "Hexagon", "Octagon"}}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> s, VertexSize -> 0.2, PlotLabel -> Style[s, 9]], {s, ResourceData["VertexShapeFunction", "Rounded"]}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> s, VertexSize -> 0.2, PlotLabel -> Style[s, 9]], {s, ResourceData["VertexShapeFunction", "Concave"]}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> { 1 -> "Square"}, VertexSize -> 0.2]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> { 1 -> "Square", "Triangle"}, VertexSize -> 0.2]任意のGraphics,ImageあるいはGraphics3Dを頂点の形として使う:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShape -> s, VertexSize -> Medium], {s, {[image], [image], [image]}}]EdgeShapeFunctionの組込みコレクションを使う:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {{ef, "ArrowSize" -> 0.1}}, PlotLabel -> ef], {ef, {"BoxLine", "DiamondLine", "DotLine"}}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {{ef, "ArrowSize" -> 0.1}}, PlotLabel -> Style[ef, 9]], {ef, ResourceData["EdgeShapeFunction", "FilledArrow"]}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {{ef, "ArrowSize" -> 0.1}}, PlotLabel -> Style[ef, 9]], {ef, ResourceData["EdgeShapeFunction", "UnfilledArrow"]}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {{ef, "ArrowSize" -> 0.1}}, PlotLabel -> Style[ef, 9]], {ef, ResourceData["EdgeShapeFunction", "CarvedArrow"]}]PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {12 -> "UnfilledArrow"}]PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {12 -> "FilledArrow", "CarvedArrow"}]ラベル付け (6)
{PlanarGraph[{Labeled[12, "hello"], 13, 14, 23, 24, 34}], PlanarGraph[{Labeled[1, "hello"], 2, 3, 4}, {12, 13, 14, 23, 24, 34}]}Table[PlanarGraph[{1, 2, Labeled[3, l], 4}, {12, 13, 14, 23, 24, 34}], {l, {Sin[x], [image], [image]}}]Table[PlanarGraph[{12, 13, 14, 23, 24, Labeled[34, l]}], {l, {Sin[x], [image], [image]}}]Placedを使って記号的な内側の位置を含む頂点ラベルの置き方を制御する:
Table[PlanarGraph[{1, 2, Labeled[3, Placed["■■", p]]}, {12, 13, 14, 23, 24, 34}, PlotLabel -> p, VertexSize -> 0.25, VertexShapeFunction -> "Square"], {p, {Left, Right, Top, Bottom}}]Table[PlanarGraph[{1, 2, Labeled[3, Placed["■■", p]]}, {12, 13, 14, 23, 24, 34}, PlotLabel -> p, VertexSize -> Small, VertexShapeFunction -> "Square"], {p, {Before, After, Below, Above}}]Table[PlanarGraph[{1, 2, Labeled[3, Placed["■", p]]}, {12, 13, 14, 23, 24, 34}, VertexSize -> 0.25, VertexShapeFunction -> "Square", PlotLabel -> p, BaselinePosition -> Bottom], {p, {{0, 0}, {1 / 2, 1 / 2}, {1, 1}}}]Placedをラッパーを使って複数のラベルを置く:
PlanarGraph[{1, 2, Labeled[3, Placed[{"lbl1", "lbl2"}, {Above, Below}]]}, {12, 13, 14, 23, 24, 34}]PlanarGraph[{1, 2, Labeled[3, Placed[{"lbl1", "lbl2", "lbl3", "lbl4"}, {Above, After, Below, Before}]]}, {12, 13, 14, 23, 24, 34}]VertexLabelsを使って複数のラベルを置く:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> {3 -> Placed[{"lbl1", "lbl2"}, {Above, Below}]}]Placedを記号位置と一緒に使って辺に沿ったラベルの置き方を制御する:
Table[PlanarGraph[{Labeled[12, Placed["■■", p]], 13, 14, 23, 24, 34}, PlotLabel -> p, VertexSize -> Small], {p, {"Start", "Middle", "End"}}]Table[PlanarGraph[{Labeled[12, Placed["■■", p]], 13, 14, 23, 24, 34}, PlotLabel -> p, VertexSize -> Small, BaselinePosition -> Bottom], {p, {0, 1 / 4, 1 / 3}}]Placedをラッパーを使って複数のラベルを置く:
PlanarGraph[{12, Labeled[31, Placed[{"lbl1", "lbl2"}, {"Start", "End"}]], 14, 23, 24, 34}]PlanarGraph[{12, Labeled[31, Placed[{"lbl1", "lbl2", "lbl3"}, {"Start", "Middle", "End"}]], 14, 23, 24, 34}]EdgeLabelsを使って複数のラベルを置く:
PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeLabels -> {31 -> Placed[{"lbl1", "lbl2"}, {"Start", "End"}]}]オプション (80)
AnnotationRules (3)
PlanarGraph[{12, 13, 14, 23, 24, 34}, AnnotationRules -> {1 -> {VertexLabels -> "hello"}}]PlanarGraph[{12, 13, 14, 23, 24, 34}, AnnotationRules -> {12 -> {EdgeLabels -> "hello"}}]PlanarGraph[{12, 13, 14, 23, 24, 34}, AnnotationRules -> {"GraphProperties" -> {"Message" -> "hello"}}]AnnotationValue[%, "Message"]DirectedEdges (2)
デフォルトで,規則のリストを与えると有向平面グラフが生成される:
PlanarGraph[{1 -> 2, 1 -> 3, 1 -> 4, 2 -> 3, 2 -> 4, 3 -> 4}]DirectedEdges->Falseを使って規則を無向辺として解釈する:
PlanarGraph[{1 -> 2, 1 -> 3, 1 -> 4, 2 -> 3, 2 -> 4, 3 -> 4}, DirectedEdges -> False]DirectedEdgeあるいはUndirectedEdgeを使ってグラフが有向かどうかを直接指定する:
{PlanarGraph[{12, 13, 14, 23, 24, 34}], PlanarGraph[{12, 13, 14, 23, 24, 34}]}EdgeLabels (7)
PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeLabels -> {12 -> "Hello"}]el = {12, 13, 14, 23, 24, 34};PlanarGraph[el, EdgeLabels -> Table[el[[i]] -> Subscript["e", i], {i, Length[el]}]]PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeLabels -> {12 -> [image], 14 -> [image], 24 -> [image]}]Placedを記号位置と一緒に使って辺に沿ったラベルの置き方を制御する:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeLabels -> {12 -> Placed["■■■", p]}, PlotLabel -> p], {p, {"Start", "Middle", "End"}}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeLabels -> {12 -> Placed["■■■", p]}, PlotLabel -> p, BaselinePosition -> Bottom], {p, {0, 1 / 3, 1 / 4}}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeLabels -> {12 -> Placed["■■■", {1 / 2, p}]}, PlotLabel -> p, BaselinePosition -> Bottom], {p, {{0, 0}, {1 / 2, 1 / 2}, {1, 1}}}]Placedをラッパーで使って複数のラベルを置く:
PlanarGraph[{12, Labeled[31, Placed[{"lbl1", "lbl2"}, {"Start", "End"}]], 14, 23, 24, 34}]PlanarGraph[{12, Labeled[31, Placed[{"lbl1", "lbl2", "lbl3"}, {"Start", "Middle", "End"}]], 14, 23, 24, 34}]EdgeLabelsを使って複数のラベルを置く:
PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeLabels -> {12 -> Placed[{"lbl1", "lbl2"}, {"Start", "End"}]}]TooltipとStatusAreaからの値で自動的にラベルを付ける:
PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeLabels -> Placed["Name", Tooltip]]PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeLabels -> Placed["Name", StatusArea]]EdgeShapeFunction (6)
EdgeShapeFunctionの組込み設定のリストを得る:
ResourceData["EdgeShapeFunction"]PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> "Line"]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {{ef, "ArrowSize" -> 0.1}}, PlotLabel -> ef], {ef, {"BoxLine", "DiamondLine", "DotLine"}}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {{ef, "ArrowSize" -> 0.1}}, PlotLabel -> ef], {ef, ResourceData["EdgeShapeFunction", "FilledArrow"]}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {{ef, "ArrowSize" -> 0.1}}, PlotLabel -> ef], {ef, ResourceData["EdgeShapeFunction", "UnfilledArrow"]}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {{ef, "ArrowSize" -> 0.1}}, PlotLabel -> ef], {ef, ResourceData["EdgeShapeFunction", "CarvedArrow"]}]PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {12 -> "FilledArcArrow"}]PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> {12 -> "FilledArcArrow", "CarvedArrow"}]ef[pts_List, e_] :=
Block[{s = 0.015, g = [image]}, {Arrowheads[{{s, 0.33, g}, {s, 0.67, g}}], Arrow[pts]}]PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeShapeFunction -> ef]EdgeShapeFunctionはEdgeStyleと組み合せることができる:
PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeStyle -> Blue, EdgeShapeFunction -> (Line[#1]&)]EdgeShapeFunctionはEdgeStyleより優先順位が高い:
PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeStyle -> Blue, EdgeShapeFunction -> ({Red, Line[#1]}&)]EdgeStyle (2)
EdgeWeight (2)
PlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeWeight -> RandomInteger[5, 6]]WeightedAdjacencyMatrix[%]//MatrixFormPlanarGraph[{12, 13, 14, 23, 24, 34}, EdgeWeight -> {a, b, c, d, e, f}]WeightedAdjacencyMatrix[%]//MatrixFormGraphHighlight (3)
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> Medium, GraphHighlight -> {1}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> Tiny, GraphHighlight -> {12}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> Tiny, GraphHighlight -> {1, 2, 12, 23}]GraphHighlightStyle (2)
GraphHighlightStyleの組込み設定のリストを得る:
ResourceData["GraphHighlightStyle"]GraphHighlightStyleの組込み設定を使う:
PlanarGraph[{12, 13, 14, 23, 24, 34}, GraphHighlight -> {1, 23}, VertexSize -> Small, GraphHighlightStyle -> #, PlotLabel -> #]& /@ Select[ResourceData["GraphHighlightStyle"], # =!= Automatic&]GraphLayout (2)
PlanarGraph[{12, 13, 14, 23, 24, 34}, GraphLayout -> Automatic]Table[PlanarGraph[{12, 15, 16, 23, 27, 34, 38, 45, 49, 510, 67, 610, 78, 89, 910}, GraphLayout -> l, PlotLabel -> l], {l, {"TutteEmbedding", "PlanarEmbedding"}}]PlotTheme (4)
ベーステーマ (2)
VertexCoordinates (3)
PlanarGraph[{12, 13, 14, 23, 24, 34}]AbsoluteOptionsを使って結果の頂点座標を抽出する:
AbsoluteOptions[%, VertexCoordinates]ellipseLayout[n_, {a_, b_}] := Table[{a Cos[2Pi / n u], b Sin[2Pi / n u]}, {u, 1, n}]Graphics[Point[ellipseLayout[20, {2, 1}]]]PlanarGraph[Table[1i, {i, 2, 20}], VertexCoordinates -> ellipseLayout[20, {2, 1}]]VertexCoordinatesはGraphLayoutより優先順位が高い:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexCoordinates -> Table[{i, i}, {i, 4}], GraphLayout -> "TutteEmbedding"]VertexLabels (13)
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> "Name"]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> {2 -> "one"}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> Table[i -> Subscript[v, i], {i, 4}]]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> {1 -> [image], 2 -> [image], 4 -> [image]}]Placedを記号位置と一緒に使って,外側位置を含むラベルの置き方を制御する:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.1, VertexShapeFunction -> "Square", VertexLabels -> Placed["■■■", p], PlotLabel -> p], {p, {Before, After, Below, Above}}]pl = {{Before, Below}, {After, Below}, {Before, Above}, {After, Above}};Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.1, VertexShapeFunction -> "Square", VertexLabels -> Placed["■■■", p], PlotLabel -> p], {p, pl}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.35, VertexLabels -> Placed["■■", p], VertexShapeFunction -> "Square", PlotLabel -> p], {p, {Left, Top, Right, Bottom}}]pl = {{Left, Bottom}, {Right, Bottom}, {Left, Top}, {Right, Top}};Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> .6, VertexShapeFunction -> "Square", VertexLabels -> Placed["■■", p], PlotLabel -> p], {p, pl}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.5, VertexShapeFunction -> "Square", VertexLabels -> Placed[[image], p], PlotLabel -> p, BaselinePosition -> Bottom], {p, {{0, 0}, {1 / 2, 1 / 2}, {1, 1}}}]すべてのラベルを頂点の右上コーナー位置に置き,ラベル内の座標を変化させる:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.35, VertexShapeFunction -> "Square", VertexLabels -> Placed[[image], {{1, 1}, p}], PlotLabel -> p, BaselinePosition -> Bottom], {p, {{0, 0}, {1 / 2, 1 / 2}, {1, 1}}}]Placedをラッパーで使って複数のラベルを置く:
PlanarGraph[{1, 2, Labeled[3, Placed[{"lbl1", "lbl2"}, {Above, Below}]]}, {12, 13, 14, 23, 24, 34}]PlanarGraph[{1, 2, Labeled[3, Placed[{"lbl1", "lbl2", "lbl3", "lbl4"}, {Above, After, Below, Before}]]}, {12, 13, 14, 23, 24, 34}]VertexLabelsを使って複数のラベルを置く:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> {3 -> Placed[{"lbl1", "lbl2"}, {Above, Below}]}]Placedの引数を使ってTooltipを含むフォーマットを制御する:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> Placed["Name", Tooltip]]あるいはStatusAreaを含むフォーマットを制御する:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> Placed["Name", StatusArea]]rotateLabel[lab_] := Rotate[lab, 45Degree]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> Placed["xxx", Below, rotateLabel]]panelLabel[lab_] := Panel[lab, FrameMargins -> 0, Background -> Lighter[Yellow, 0.7]]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> Placed["xxx", Center, panelLabel]]hyperlinkLabel[lab_] := Hyperlink[lab, "http://www.wolfram.com"]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexLabels -> Placed["xxx", Center, hyperlinkLabel]]VertexShape (5)
任意のGraphics,ImageあるいはGraphics3Dを頂点の形に使う:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShape -> s, VertexSize -> 0.3], {s, {[image], [image], [image]}}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShape -> {2 -> [image]}, VertexSize -> 0.3]VertexShapeはVertexSizeと組み合せることができる:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> s, VertexShape -> [image], PlotLabel -> s], {s, {Medium, Large}}]VertexShapeはVertexStyleの影響を受けない:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.3, VertexShape -> [image], VertexStyle -> Blue]VertexShapeFunctionはVertexShapeより優先順位が高い:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.2, VertexShapeFunction -> "Square", VertexShape -> [image]]VertexShapeFunction (10)
組込みのVertexShapeFunctionコレクションのリストを得る:
ResourceData["VertexShapeFunction"]"Basic"コレクションのVertexShapeFunctionの組込み設定を使う:
ResourceData["VertexShapeFunction", "Basic"]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> vf, VertexSize -> 0.2, PlotLabel -> vf], {vf, {"Triangle", "Square", "Rectangle", "Pentagon", "Hexagon", "Octagon"}}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> vf, VertexSize -> 0.2, PlotLabel -> vf], {vf, {"DownTrapezoid", "UpTrapezoid", "Parallelogram", "FiveDown", "Circle", "Diamond", "Star", "Capsule"}}]"Rounded"コレクションのVertexShapeFunctionの組込み設定を使う:
ResourceData["VertexShapeFunction", "Rounded"]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> vf, VertexSize -> 0.2, PlotLabel -> vf], {vf, ResourceData["VertexShapeFunction", "Rounded"]}]"Concave"コレクションのVertexShapeFunctionの組込み設定を使う:
ResourceData["VertexShapeFunction", "Concave"]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> vf, VertexSize -> 0.2, PlotLabel -> vf], {vf, ResourceData["VertexShapeFunction", "Concave"]}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> { 1 -> "Square"}, VertexSize -> 0.2]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> { 1 -> "Square", "Triangle"}, VertexSize -> 0.2]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> (Inset[[image], #]&)]vf[{xc_, yc_}, name_, {w_, h_}] :=
Block[{xmin = xc - w, xmax = xc + w, ymin = yc - h, ymax = yc + h},
Polygon[{{xmin, ymin}, {xmax, ymax}, {xmin, ymax}, {xmax, ymin}}]
];PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> vf, VertexSize -> 0.2]VertexShapeFunctionはVertexStyleと組み合せることができる:
vf1[{xc_, yc_}, name_, {w_, h_}] := Rectangle[{xc - w, yc - h}, {xc + w, yc + h}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.2, VertexStyle -> Blue, VertexShapeFunction -> vf1]VertexShapeFunctionはVertexStyleより優先順位が高い:
vf2[{xc_, yc_}, name_, {w_, h_}] := {Red, Rectangle[{xc - w, yc - h}, {xc + w, yc + h}]}PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.2, VertexStyle -> Blue, VertexShapeFunction -> vf2]VertexShapeFunctionはVertexSizeと組み合せることができる:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexShapeFunction -> "Star", VertexSize -> {1 -> Small, Medium}]VertexShapeFunctionはVertexShapeより優先順位が高い:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.3, VertexShapeFunction -> "Star", VertexShape -> [image]]VertexSize (8)
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> Automatic]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> s, PlotLabel -> s], {s, {Tiny, Small, Medium, Large}}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> s, PlotLabel -> s], {s, 0.1, 1, 0.3}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> {"Scaled", s}, PlotLabel -> {"Scaled", s}], {s, 0.1, 1, 0.3}]Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> s, PlotLabel -> s], {s, {{0.1, 0.2}, {0.2, 0.1}}}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> {1 -> 0.2, 2 -> 0.3}]VertexSizeはVertexShapeFunctionと組み合せることができる:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> s, VertexShapeFunction -> "Square", PlotLabel -> s], {s, {0.05, 0.1, 0.2}}]VertexSizeはVertexShapeと組み合せることができる:
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> s, VertexShape -> [image], PlotLabel -> s], {s, {0.1, 0.2, 0.4}}]VertexStyle (5)
Table[PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexStyle -> style, VertexSize -> 0.3, PlotLabel -> style], {style, {Yellow, EdgeForm[Dashed]}}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexStyle -> {1 -> Blue, 2 -> Red}, VertexSize -> 0.2]VertexShapeFunctionはVertexStyleと組み合せることができる:
vf1[{xc_, yc_}, name_, {w_, h_}] := Rectangle[{xc - w, yc - h}, {xc + w, yc + h}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.2, VertexStyle -> Blue, VertexShapeFunction -> vf1]VertexShapeFunctionはVertexStyleより優先順位が高い:
vf2[{xc_, yc_}, name_, {w_, h_}] := {Red, Rectangle[{xc - w, yc - h}, {xc + w, yc + h}]}PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.2, VertexStyle -> Blue, VertexShapeFunction -> vf2]VertexStyleはBaseStyleと組み合せることができる:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexStyle -> LightBlue, BaseStyle -> EdgeForm[Dotted], VertexSize -> 0.2]VertexStyleはBaseStyleより優先順位が高い:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexStyle -> LightBlue, BaseStyle -> Gray, VertexSize -> 0.2]VertexShapeはVertexStyleの影響を受けない:
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexSize -> 0.3, VertexShape -> [image], VertexStyle -> Blue]VertexWeight (3)
PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexWeight -> {2, 3, 4, 5}]AnnotationValue[{%, 1}, VertexWeight]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexWeight -> {1 -> 2}]PlanarGraph[{12, 13, 14, 23, 24, 34}, VertexWeight -> {a, b, c, d}]AnnotationValue[{%, 1}, VertexWeight]関連するガイド
テキスト
Wolfram Research (2016), PlanarGraph, Wolfram言語関数, https://reference.wolfram.com/language/ref/PlanarGraph.html.
CMS
Wolfram Language. 2016. "PlanarGraph." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PlanarGraph.html.
APA
Wolfram Language. (2016). PlanarGraph. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PlanarGraph.html
BibTeX
@misc{reference.wolfram_2026_planargraph, author="Wolfram Research", title="{PlanarGraph}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/PlanarGraph.html}", note=[Accessed: 12-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_planargraph, organization={Wolfram Research}, title={PlanarGraph}, year={2016}, url={https://reference.wolfram.com/language/ref/PlanarGraph.html}, note=[Accessed: 12-November-2026]}