plot3d showing a blank page (WSL)

30 views
Skip to first unread message

G. M.-S.

unread,
Aug 29, 2025, 11:56:06 AM (7 days ago) Aug 29
to sage-s...@googlegroups.com

A very short question (hoping it is not a stupid one).

How to make
online=True
the default for plot3d and related commands?

Background:
  • SageMath on Windows through WSL (using Conda or an AppImage).
  • Windows browser (because Ubuntu browser seems to be too slow).
  • plot3d gives a blank page.
This seems due to the temporary HTML file created by plot3d containing
<script src="/var/tmp/sage-10.7/local/share/threejs-sage/r122/three.min.js"></script>
which is not accessible from the Windows browser (even after changing the path).

Possible workarounds are:
  1. Copy three.min.js to the temporary directory of the HTML file and modify the line above:
    <script src="three.min.js"></script>
    but this file is 656 KB, so multiple invocations of plot3d will take a lot of space.
  2. Copy three.min.js to a directory accessible from the Windows browser.  I do not know if this is possible.
  3. Use plot3d( … , online=True) which changes the line above to
    <script src="https://cdn.jsdelivr.net/gh/sagemath/threejs-sage@r122/build/three.min.js"></script>
    but this needs internet access.
TIA for your help.

Guillermo

Marc Culler

unread,
Aug 30, 2025, 7:47:55 PM (6 days ago) Aug 30
to sage-support
Hi Guillermo,

The AppImage creates a symlink (in the WSL linux filesystem) pointing from /var/tmp/sage-10.7 to the root of the AppImage's fuse mounted filesystem, which contains Sage's local directory.

A Google AI search claimed (probably incorrectly) that the following would work if you are using the default Ubuntu image in WSL:

<script src="file:////wsl.localhost/Ubuntu/var/tmp/sage-10.7/local/share/threejs-sage/r122/three.min.js"></script>

You could try that.

- Marc
Reply all
Reply to author
Forward
0 new messages