cocalc-docker icon indicating copy to clipboard operation
cocalc-docker copied to clipboard

nbextensions (3d plots) do not work in Jupyter in the Docker version

Open jdemeyer opened this issue 7 years ago • 1 comments

In the Docker version of SageMathCloud, enter the following in a Jupyter notebook running the SageMath 8.4 kernel:

var('x,y')
show(plot3d(x^2+y^2, (x,-1,1), (y,-1,1)), viewer="jmol")

This displays a "Load Viewer..." button. Clicking that button just displays a large blank space.

My browser's Javascript console says

GET https://sage4.ugent.be/nbextensions/jsmol/JSmol.min.js 404 (Not Found)

With the cocalc.com instance, the URL https://cocalc.com/nbextensions/jsmol/JSmol.min.js does work.

This looks related to https://github.com/sagemathinc/cocalc/issues/159

jdemeyer avatar Nov 21 '18 13:11 jdemeyer

Also reported by @electron3202 in sagemathinc/cocalc#3813.

In CoCalc docker, 3D plots with Sagemath kernel in CoCalc Jupyter notebooks render with tachyon viewer, but give blank output when clicking "Load Viewer..." with jmol or threejs.

Workaround: add viewer='tachyon' to calls to parametric_plot(), show(), etc.

It should be possible to get the jmol viewer working in CoCalc-docker, because it works in CoCalc.com. But the threejs viewer doesn't produce output with Jupyter & Sagemath kernel even in CoCalc.com, although it does work with Sage worksheets. See sagemathinc/cocalc#159.

DrXyzzy avatar May 09 '19 17:05 DrXyzzy

3d plots do work now.

williamstein avatar Mar 15 '23 15:03 williamstein