Opened 11 years ago
Last modified 7 years ago
#8631 needs_work enhancement
Make a graph-input interact control
Reported by: | rbeezer | Owned by: | itolkov |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | interact | Keywords: | graph editor |
Cc: | rkirov, was, kevinc | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Should be able to use the graph editor as an input widget for interacts.
Preliminary proposal on sage-devel: http://groups.google.com/group/sage-devel/browse_thread/thread/f5b850969340bc37/
Current state of graph editor: #8222
Attachments (3)
Change History (13)
comment:1 Changed 11 years ago by
comment:2 follow-up: ↓ 3 Changed 11 years ago by
Similarly to what Rob tried. I opened interact.py and started editing (this is probably the longest .py file I ever worked with).
So far I can make the virtual interact and it can try to start the embedded graph editor. But i run into a weird thing where my injected graph data gets transformed as follows all " , " -> " ,="" ".
Anyways, if anybody else is working on this, we should exchange some patches even if they are very incomplete.
comment:3 in reply to: ↑ 2 Changed 11 years ago by
Replying to rkirov:
Anyways, if anybody else is working on this, we should exchange some patches even if they are very incomplete.
Definitely. I'll try to recover what I worked up before and post it here in the next couple days. My work on this got a bit jumbled, which stopped me a few days ago on a final review of the editor itself at #8222.
So I'll tackle both of these in one shot.
Rob
comment:4 Changed 11 years ago by
- Status changed from new to needs_work
the graph interact is ready. The patches depends on the newest graph_editor which is #8222.
Needs work because i haven't done doctests and haven't decided how to incorporate the overlapping code with the graph_editor into one js graph library (right now i just copied it into a new file graph_interact.js and modified).
In any case it is working for anyone who wants to see how eigenvalues or chromatic numbers change dynamically (as you throw in or throw out vertices and edges). Enjoy!
comment:5 Changed 11 years ago by
Rado,
Very nice! This works for me - I'll upload a screenshot next.
For anybody else testing, you just need a line like
G=Graph(...)
in the argument list of the function you are using as the interact. It seems that you need to specify the initial graph as something other than a null graph, and whatever this graph might be, the routine expects to find position information.
Nice work!
Rob
comment:6 Changed 11 years ago by
Nice!
It looks like in the patch that there is a huge section of code that is commented out that should be just deleted.
comment:7 Changed 8 years ago by
- Cc changed from rkirov,was,kevinc to rkirov, was, kevinc
- Milestone changed from sage-5.11 to sage-5.12
comment:8 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:9 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:10 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
Good idea. If we do this, we might want to also have an interact control that gives a nice interactive way of choosing a graph from the family of all graphs. This would be what graphs.[tab] gives, but more graphical.
I wonder if interact controls should be rewritten to somehow be as easy to make as @interact's themselves? It would cool to abstract out the whole idea of interact controls so that users could just make them on the fly.