2

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.

Louis D
  • 123
  • 4

1 Answers1

2

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.

Samuel Lelièvre
  • 3,212
  • 1
  • 14
  • 27
  • Thank you very much! I still have some work to do to see if I can follow through on these answers, but I really appreciate the level of detail in your answer. – Louis D Sep 09 '20 at 15:36
  • qdge is a bit lacking with respect to documentation, but let me know (e.g. in the Github issues) if you encounter any problems, and I will try to resolve them. – nvcleemp Sep 10 '20 at 08:16
  • I also just noticed that I still had several commits locally that were not yet pushed to the repository. They have now been pushed. I can confirm that qdge allows you to draw a graph and export it to graph6, and I think it is already quite stable: just not really polished. – nvcleemp Sep 10 '20 at 08:25
  • @nvcleemp I was able to get qdge running. From my initial experimentation, it seems to be working properly. I don't know anything about GWT and thus haven't been able to get grapheditor running. – Louis D Sep 11 '20 at 15:05
  • 1
    @LouisD Yes, in the meantime I had a look at qdge, and it was in further state of completion then I remembered. It isn't perfect, and it doesn't have bells and whistles, but it does the job that you needed: draw a graph and get the graph6. To go the other way, i.e., enter the graph6 and layout the graph, it's a bit confusing at the moment because all vertices are placed onto each other. I will see to add some embedders like a simple force directed embedder to the program. – nvcleemp Sep 13 '20 at 07:34