OpenersPrimaryExamplesSection(Spacer1)Examples  (7)

OpenersExampleSection0(Spacer1)Basic Examples  (7)

This imports a small graph6 sample file:

Import["ExampleData/cubical.g6"]

Show the edge rules representing the graph:

Import["ExampleData/cubical.g6", "EdgeRules"]

Import the corresponding adjacency matrix and render it as a (RefLink[MatrixPlot, paclet:ref/MatrixPlot]):

Import["ExampleData/cubical.g6", "AdjacencyMatrix"] [[1]]// MatrixPlot

Convert a string representing graph6 data to a visual representation of a graph:

ImportString["MAbaHfLt}dk]mf~{_", "Graph6"]

Export a (RefLink[Graph, paclet:ref/Graph]) object to the graph6 format:

ExportString[KnightTourGraph[4,4],"Graph6"]

Export the adjacency matrix of a graph to the graph6 format:

ExportString[GraphData[{"Windmill",{3,6}},"AdjacencyMatrix"],"Graph6"]

Export edge rules:

ExportString[{1->2,1->3,1->5,2->4,2->6,3->4,3->7,4->8,5->6,5->7,6->8,7->8}, "Graph6"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {Related Formats:  (RefLink[Sparse6, paclet:ref/format/Sparse6])  ▪  (RefLink[GraphML, paclet:ref/format/GraphML])  ▪  (RefLink[GXL, paclet:ref/format/GXL])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Importing & Exporting, paclet:guide/ImportingAndExporting])}, {▪(RefLinkPlain[Listing of All Formats, paclet:guide/ListingOfAllFormats])}, {▪(RefLinkPlain[Mathematical Data, paclet:guide/MathematicalData])}, {▪(RefLinkPlain[Mathematical Data Formats, paclet:guide/MathematicalDataFormats])}})}})