is_planar#
- is_planar(G)[source]#
Returns True if and only if
Gis planar.A graph is planar iff it can be drawn in a plane without any edge intersections.
- Parameters:
- GNetworkX graph
- Returns:
- bool
Whether the graph is planar.
See also
check_planarityCheck if graph is planar and return a
PlanarEmbeddinginstance if True.
Examples
>>> G = nx.Graph([(0, 1), (0, 2)]) >>> nx.is_planar(G) True >>> nx.is_planar(nx.complete_graph(5)) False