-
-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a graph-input interact control #8631
Comments
comment:1
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 |
comment:2
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
Replying to @rkirov:
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 |
Attachment: 8631.sagenb.patch.gz patch for sagenb - depends on #8222 |
Attachment: 8631.sage.patch.gz tiny sage patch to avoid a circular import |
comment:4
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
Rado, Very nice! This works for me - I'll upload a screenshot next. For anybody else testing, you just need a line like
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 |
Screenshot of graph editor interact control |
comment:6
Attachment: graph-interact.png Nice! It looks like in the patch that there is a huge section of code that is commented out that should be just deleted. |
Dependencies: #30540 |
comment:11
#30540 has made a graph editor available |
Reviewer: Jean-Florent Raymond |
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
Depends on #30540
CC: @rkirov @williamstein @sagetrac-kevinc
Component: interact
Keywords: graph editor
Reviewer: Jean-Florent Raymond
Issue created by migration from https://trac.sagemath.org/ticket/8631
The text was updated successfully, but these errors were encountered: