Re: [sage-devel] graph editor -- devel doc
On Thu, Jan 21, 2010 at 12:22:05PM -0800, William Stein wrote: The new graph editor in sage by Rado is AWESOME. YES!!! We are producing graphs all the time (representing all sorts of combinatorial/algebraic data), and have been dreaming of such a life saving feature for years. We would just further need support for: - Displaying vertex labels. In a perfect world, that would include latex labels. But string labels (especially with support for newlines) would already do the job in most cases. - Customizing the size of the edition window (typically to make it as wide as the browser's frame). Thanks! Best, Nicolas -- Nicolas M. Thiéry Isil nthi...@users.sf.net http://Nicolas.Thiery.name/ -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] graph editor -- devel doc
Hi, The new graph editor in sage by Rado is AWESOME. One can try it easily at http://sagenb.org by typing: g = graphs.CompleteGraph(10) graph_editor(g) The actual source code is at local/lib/python/site-packages/sagenb-0.6-py2.6.egg/sagenb/data/graph_editor/ It would be *GREAT* if there were a README.txt file in that directory that explained what all the js files actually are, something about how the graph editor works, where the code that does spring layout dynamically is located, etc. I looked at the code for five minutes and couldn't deduce answers to any of those questions. So, could somebody familiar with the graph editor write something and post a patch. Or just respond to this email with what would go in a README.txt? I have two undergrads who might want to work on that code, but it would help a lot of there were some docs. William -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] graph editor -- devel doc
I agree that it's awesome. I'm not sure if I'm using it right though. If I remove a vertex from Williams example below, and then click Save, it changes the cell, but the graph that it then creates is the same as before I removed the vertex. The same problem seems to occur for most changes I make to the graph (though I somehow got it to add a vertex and pair of edges at one point; I'm no longer sure how). Can other people duplicate this? This looks like a bug, but I'm not quite sure what the designed behavior is. ;-) David On Thu, Jan 21, 2010 at 3:22 PM, William Stein wst...@gmail.com wrote: Hi, The new graph editor in sage by Rado is AWESOME. One can try it easily at http://sagenb.org by typing: g = graphs.CompleteGraph(10) graph_editor(g) The actual source code is at local/lib/python/site-packages/sagenb-0.6-py2.6.egg/sagenb/data/graph_editor/ It would be *GREAT* if there were a README.txt file in that directory that explained what all the js files actually are, something about how the graph editor works, where the code that does spring layout dynamically is located, etc. I looked at the code for five minutes and couldn't deduce answers to any of those questions. So, could somebody familiar with the graph editor write something and post a patch. Or just respond to this email with what would go in a README.txt? I have two undergrads who might want to work on that code, but it would help a lot of there were some docs. William -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.comsage-devel%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] graph editor -- devel doc
On 01/21/2010 12:22 PM, William Stein wrote: local/lib/python/site-packages/sagenb-0.6-py2.6.egg/sagenb/data/graph_editor/ It would be *GREAT* if there were a README.txt file in that directory that explained what all the js files actually are, something about how the graph editor works, where the code that does spring layout dynamically is located, etc. I looked at the code for five minutes and couldn't deduce answers to any of those questions. Just a quick note: I think the main files are a. sage/graphs/graph_editor.py b. graph_editor.html c. graph_editor.js d. processing.editor.min.js Evaluating graph_editor(G) (see (a)) in an input cell generates code/markup for an inline frame, which the notebook inserts into the corresponding output cell. The iframe loads (b) as its content. In turn, (b) draws in jQuery / UI, the layout algorithms in (c), and the HTML5 canvas rendering engine in (d). According to http://trac.sagemath.org/sage_trac/ticket/1321#comment:31 Rado adapted (d) from a project called Processing.js http://processingjs.org/ http://processingjs.org/reference http://processingjs.org/download whose original and minified source files are e. processing.js f. processing.min.js To make it somewhat easier to understand the differences between (f) and (d), I put (d) through a JS beautifier http://jsbeautifier.org/ The result is g. processing.editor.js But I decided not to give the same treatment to (e) and attempt to make a concise diff. All errors are my own. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] graph editor -- devel doc
On Thu, Jan 21, 2010 at 2:14 PM, Pat LeSmithe qed...@gmail.com wrote: On 01/21/2010 12:22 PM, William Stein wrote: local/lib/python/site-packages/sagenb-0.6-py2.6.egg/sagenb/data/graph_editor/ It would be *GREAT* if there were a README.txt file in that directory that explained what all the js files actually are, something about how the graph editor works, where the code that does spring layout dynamically is located, etc. I looked at the code for five minutes and couldn't deduce answers to any of those questions. Just a quick note: I think the main files are Thanks! I've made this: http://trac.sagemath.org/sage_trac/ticket/8033 a. sage/graphs/graph_editor.py b. graph_editor.html c. graph_editor.js d. processing.editor.min.js Evaluating graph_editor(G) (see (a)) in an input cell generates code/markup for an inline frame, which the notebook inserts into the corresponding output cell. The iframe loads (b) as its content. In turn, (b) draws in jQuery / UI, the layout algorithms in (c), and the HTML5 canvas rendering engine in (d). According to http://trac.sagemath.org/sage_trac/ticket/1321#comment:31 Rado adapted (d) from a project called Processing.js http://processingjs.org/ http://processingjs.org/reference http://processingjs.org/download whose original and minified source files are e. processing.js f. processing.min.js To make it somewhat easier to understand the differences between (f) and (d), I put (d) through a JS beautifier http://jsbeautifier.org/ The result is g. processing.editor.js But I decided not to give the same treatment to (e) and attempt to make a concise diff. All errors are my own. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org