PlanarGraphQ[g]
PlanarGraphQ
PlanarGraphQ[g]
Examples
open all close allBasic Examples (2)
Scope (6)
PlanarGraphQ works with undirected graphs:
PlanarGraphQ[[image]]PlanarGraphQ[[image]]PlanarGraphQ[[image]]PlanarGraphQ[[image]]PlanarGraphQ gives False for expressions that are not graphs:
PlanarGraphQ[x]PlanarGraphQ works with large graphs:
GridGraph[{10, 10, 10, 10}];PlanarGraphQ[%]//TimingApplications (2)
Four colors can be used to color a map with no two adjacent countries having the same color:
PlanarGraphQ[\!\(\*GraphicsBox[«4»]\)]colors = {Red, Yellow, Blue, Green}[[{4, 2, 1, 3, 3, 1, 2, 2, 4, 3, 4, 3, 2, 2}]];Graphics[{EdgeForm[Black], MapIndexed[{colors[[First[#2]]], CountryData[#, "Polygon"]}&, CountryData["SouthAmerica"]]}]Check whether non-overlapping utility lines can be used to distribute gas, water, and electricity:
PlanarGraphQ[[image]]Properties & Relations (3)
Use GraphData for an extensive collection of planar graphs:
Short[GraphData["Planar"]]Short[GraphData["Nonplanar"]]Use GraphLayout->"PlanarLayout" to lay out a planar graph:
HararyGraph[4, 8, GraphLayout -> "PlanarLayout"]For connected planar graphs with
vertices and
edges,
with
the number of faces:
g = HypercubeGraph[3]{ConnectedGraphQ[g], PlanarGraphQ[g]}VertexCount[g] - EdgeCount[g] + 6Related Guides
History
Text
Wolfram Research (2012), PlanarGraphQ, Wolfram Language function, https://reference.wolfram.com/language/ref/PlanarGraphQ.html.
CMS
Wolfram Language. 2012. "PlanarGraphQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PlanarGraphQ.html.
APA
Wolfram Language. (2012). PlanarGraphQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PlanarGraphQ.html
BibTeX
@misc{reference.wolfram_2026_planargraphq, author="Wolfram Research", title="{PlanarGraphQ}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/PlanarGraphQ.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_planargraphq, organization={Wolfram Research}, title={PlanarGraphQ}, year={2012}, url={https://reference.wolfram.com/language/ref/PlanarGraphQ.html}, note=[Accessed: 13-June-2026]}