I'm interested in constructing an interactive GUI graph generator, where I can add and delete vertices and edges.
I'm aware of this question, and this is but a quick follow-up to this answer. I would like to simply edit István Zachar's code to answer the following questions
- Is it possible to recover/paste the constructed graph? How does one do it (an undirected graph would be ok)?
- Could I easily toggle the graph between directed and undirected?
- Also, I wonder if it's possible to, given a graph, edit it with such a GUI construction.
I feel like it should be relatively easy to do it using this code, but I'm not yet very comfortable working DynamicModule
. I wonder if there is a Manipulate
version of this.
Any ideas?
Graph
when re-evaluated. Requirements: (1) Directed/undirected support (mixed graph not necessary). (2) Movable vertices (3) Possibility to add/remove edges/vertices (4) Keep usability in mind: try to build various small graphs with it. (5) Reasonably commented readable implementation (so others can build on it). $\endgroup$