CoCalc Public Filestmp / D3 graphs -- example of how to do.sagewsOpen in with one click!
Authors: Harald Schilly, ℏal Snyder, William A. Stein
g = graphs.PetersenGraph() from sage.graphs.graph_plot_js import gen_html_code filename = gen_html_code(graphs.PetersenGraph())
open('a.html','w').write(open(filename).read().replace("http://d3js.org/d3.v3.min.js","https://cloud.sagemath.com/93b6433d-41ff-49b4-9612-82e7a9da72be/raw/d3.v3.min.js"))
gen_html_code??__builtins__