- Usage:
`P = onlyPlanar L``P = onlyPlanar(L, non)`

- Inputs:
`L`, a list, containing graphs in various formats`non`, a Boolean value, whether to return non-planar graphs

- Outputs:
`P`, a list, containing the planar graphs of*L*in Graph6 or Sparse6 format

A graph is planar if the graph can be embedded in the plane, i.e., the vertices can be arranged such that no edges cross except at vertices.

The only non-planar graph on five vertices is the complete graph.

i1 : K5 = graph flatten for i from 0 to 4 list for j from i+1 to 4 list {i,j}; |

i2 : P = onlyPlanar(generateGraphs 5, true) o2 = {D~{} o2 : List |

i3 : areIsomorphic(first P, K5) o3 = true |

This method uses the program `planarg`. The code was written by Paulette Lieby for the Magma project and used with permission in the software nauty.

- isPlanar -- determines if a given graph is planar

- onlyPlanar(List)
- onlyPlanar(List,Boolean)