New version of the Javascript visualization of Sage with D3.js
This project was started by the students of Licence Pro at IUT of Montpellier 2 years ago and taken by our group (students on DUT informatique) to improve and debug.
Download the source code from GitHub and make sure you have SageMath installed.
Unzip the source code and type this in your Sage terminal:
attach("path_to_file_init_CustomJS.py")
For example, if this project was downloaded in the same folder where Sage is installed (say .sage/
), then you should type :
attach("JS_Graph_Sage/src/Python/init_CustomJS.py")`
Now you can launch the interface by creating a graph in your terminal (for example: g = graphs.CompleteGraph(20)
) and typing show_CustomJS(g)
.
If the modifications you want to add cannot be made in the interface, you can run the necessary commands in Sage terminal and click Redraw Graph
button on top of the page to import changes. Or you can simply reload the page.