Skip to content
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

Closed
rbeezer mannequin opened this issue Mar 30, 2010 · 12 comments
Closed

Make a graph-input interact control #8631

rbeezer mannequin opened this issue Mar 30, 2010 · 12 comments

Comments

@rbeezer
Copy link
Mannequin

rbeezer mannequin commented Mar 30, 2010

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

@rbeezer rbeezer mannequin added this to the sage-5.11 milestone Mar 30, 2010
@rbeezer rbeezer mannequin added c: interact labels Mar 30, 2010
@rbeezer rbeezer mannequin assigned itolkov Mar 30, 2010
@williamstein
Copy link
Contributor

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 @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.

@rkirov
Copy link

rkirov commented Apr 12, 2010

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.

@rbeezer
Copy link
Mannequin Author

rbeezer mannequin commented Apr 12, 2010

comment:3

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

@rkirov
Copy link

rkirov commented Apr 29, 2010

Attachment: 8631.sagenb.patch.gz

patch for sagenb - depends on #8222

@rkirov
Copy link

rkirov commented Apr 29, 2010

Attachment: 8631.sage.patch.gz

tiny sage patch to avoid a circular import

@rkirov
Copy link

rkirov commented Apr 29, 2010

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!

@rbeezer
Copy link
Mannequin Author

rbeezer mannequin commented Apr 29, 2010

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

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

@rbeezer
Copy link
Mannequin Author

rbeezer mannequin commented Apr 29, 2010

Screenshot of graph editor interact control

@jasongrout
Copy link
Member

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.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 3, 2022

Dependencies: #30540

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 3, 2022

comment:11

#30540 has made a graph editor available

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Apr 3, 2022
@jfraymond
Copy link

Reviewer: Jean-Florent Raymond

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants