#13418: Add method for drawing graphs using Ivan Kuckir graph drawer
--------------------------------+-------------------------------------------
Reporter: slabbe | Owner: slabbe
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
--------------------------------+-------------------------------------------
Old description:
> This adds the following method :
>
> {{{
> sage: g = graphs.PetersenGraph()
> sage: g.html_ivan_kuckir()
> <html><font color='black'><iframe
> src="http://g.ivank.net/g.html#10:1-2,1-5,1-6,2-3,2-7,3-4,3-8,4-5,4-9,5-10,6-8,6-9,7-9,7-10,8-10"
> width="500" height="500" style=
> "border:none;"></iframe></font></html>
> }}}
>
> It works well in the notebook and the result can be seen at this adress :
>
> http://g.ivank.net/g.html#10:1-2,1-5,1-6,2-3,2-7,3-4,3-8,4-5,4-9,5-10,6-8,6-9,7-9,7-10,8-10
>
> References :
>
> http://www.chromeexperiments.com/detail/graph-drawer/
> http://g.ivank.net/
>
> '''Apply''': [attachment:13418_ivank_graph_drawer-sl.patch]
New description:
This adds the following method :
{{{
sage: g = graphs.PetersenGraph()
sage: g.g_ivank_string()
'10:1-8,1-9,1-10,2-5,2-7,2-10,3-4,3-7,3-9,4-6,4-10,5-6,5-9,6-8,7-8'
}}}
This string can be used for visualization at this adress :
http://g.ivank.net/g.html#10:1-2,1-5,1-6,2-3,2-7,3-4,3-8,4-5,4-9,5-10,6-8,6-9,7-9,7-10,8-10
References :
http://www.chromeexperiments.com/detail/graph-drawer/
http://g.ivank.net/
'''Apply''': [attachment:13418_ivank_graph_drawer-sl.patch]
--
Comment (by slabbe):
I agree with you. Returning an iframe that is hidden to the user was not a
good idea.
Although there exists other open source alternative for doing such graph
visualisation, I believe this patch is simple to code and useful for
integration in Sage (I used it myself at least two times to visualize
graphs since September). The interaction with other software (closed
source or not) is not forbidden in Sage as there exists interfaces to
Magma, Maple for instance. An interface to arborjs would be nice as well
and I am willing to referee such tickets.
I uploaded a new patch. Instead, I just return an inoffensive string. The
user may do whatever he wants with it. I think it is better like that.
Before, the earlier code returning `html(s)` was problematic and prevented
code reuse.
Needs review again!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13418#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.