A tool for drawing graphs which returns the graph6 code or adjacency matrix

418 Views Asked by At

What I'm looking for is a tool where the entire purpose is to draw a graph and have it return the graph6 code (ultimately so that I can easily input it into Sage).

On House of Graphs, you can draw a graph and it will search for the graph in the database. But if you search for a graph which is not in the database, you get a message like this and an empty list.

Your current result list contains all graphs that satisfy the following criteria:

Graph with canonical form 'H???Gva'

The problem is that if the graph is "too big", you get a message like this, where the "..." indicates that we are not seeing the entire graph6 code.

Your current result list contains all graphs that satisfy the following criteria:

Graph with canonical form 'S????????????????????????????F...'

Note: There are tools such as this which can translate an adjacency matrix into graph6 code.

1

There are 1 best solutions below

5
On BEST ANSWER

Some tools

Thanks to Jan Goedgebeur (one of the House of Graphs authors) and to Nico Van Cleemput for their input.

qdge

qdge (for "quick-and-dirty graph editor"), by Nico Van Cleemput

Nico Van Cleemput comments:

It's a quick-and-dirty graph editor that I wrote once when I needed to draw some graphs. It's very likely to still contain bugs, but IIRC it was to the point where you could draw a graph and get the graph6 string for it.

grapheditor

grapheditor, by Nico Van Cleemput

A graph drawing tool made many years ago using GWT.

This is the tool used by the "House of Graphs" website.

Up to now the repository was private but thanks to your question Nico Van Cleemput just made it public.

Nico Van Cleemput comments:

I don't know if the tools still exist to compile it.

Graph editor in legacy SageNB notebook

SageMath used to have its own notebook, called SageNB, which is now being abandoned in favour of Jupyter.

That notebook contained a graph editor.

To use it, use any SageMath version built for Python 2, start the SageNB notebook, and use the graph editor there.

Documentation:

Notes on SageNB retirement in SageMath:

  • The SageNB notebook is being retired because it does not support Python 3. You can still get it by installing a version of SageMath based on Python 2.

  • The graph editor is one of the few SageNB goodies which still has no replacement that works with Jupyter.

Notes about SageMath and Python 2 vs Python 3

  • Starting with the SageMath 8.x series, increasing support for building Sage for Python 3 was added, but the default remained to build it for Python 2.

  • Starting from SageMath 9.0, the default for building Sage switched to Python 3, but SageMath 9.0 and 9.1 can still be built for Python 2.

  • SageMath 9.1 for Python 2 can be downloaded from the SageMath download pages, or can be built from source.

  • Starting from SageMath 9.2, only Python 3 is supported.