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

graph and digraph animations #2378

Closed
jasongrout opened this issue Mar 3, 2008 · 7 comments
Closed

graph and digraph animations #2378

jasongrout opened this issue Mar 3, 2008 · 7 comments

Comments

@jasongrout
Copy link
Member

We ought to have a way to create animations like these:

http://www.cs.sunysb.edu/~skiena/combinatorica/animations/

See the Mathematica function:

http://reference.wolfram.com/mathematica/Combinatorica/ref/AnimateGraph.html

Component: graph theory

Reviewer: Kwankyu Lee

Issue created by migration from https://trac.sagemath.org/ticket/2378

@jasongrout
Copy link
Member Author

comment:1

See also the highlight function:

http://reference.wolfram.com/mathematica/Combinatorica/ref/Highlight.html

@jasongrout jasongrout added this to the sage-2.10.3 milestone Mar 3, 2008
@jasongrout jasongrout changed the title graph animations graph and digraph animations Mar 3, 2008
@jasongrout
Copy link
Member Author

comment:4

To do the above, I think it would be sufficient to add an option to graph.plot that would implement the "Highlight" functionality from Mma

@rlmill rlmill mannequin assigned jasongrout and unassigned rlmill Sep 10, 2008
@jasongrout jasongrout removed this from the sage-3.1.3 milestone Sep 10, 2008
@jasongrout
Copy link
Member Author

comment:7

Code for a highlight function:

normal_vertex_color='#fec7b8'
normal_edge_color = 'black'
def highlight(g,vertices=[],edges=[],**kwds):
    edges = [e[0:2] for e in edges]
    normal_edges = list(set(g.edges(labels=False)).difference(set([e[0:2] for e in edges])))
    normal_vertices = list(set(g.vertices()).difference(set(vertices)))
    return g.plot(vertex_colors={'red': vertices, normal_vertex_color: normal_vertices}, edge_colors={'red': edges, normal_edge_color: normal_edges},**kwds)
g=graphs.DodecahedralGraph()
highlight(g,[1,2],[(1,2),(2,6)],layout="spring")

@jfraymond
Copy link

comment:8

This is now possible with the graph editor widget phitigra, added as a package in #30540.
See the demo notebook at https://github.com/jfraymond/phitigra for examples with DFS and Dijkstra's algorithm.
Therefore I am changing the ticket status to "duplicate/invalid/wontfix".

@dcoudert
Copy link
Contributor

comment:9

We can certainly close it

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 22, 2022

comment:10

I just played with the Dijkstra's algorithm implemented with Phitigra. It works like a charm!

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 22, 2022

Reviewer: Kwankyu Lee

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

5 participants