ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 11 Feb 2021 00:59:40 +0100plot3d displaying black graph in jupyter for both 9.0 and 9.1https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/I installed sage 9.1, and also installed its kernel on Jupyter.
Everything other than `plot3d` works fine.
For `plot3d`, the behavior of 9.1 is same as 9.0, it shows a black background.
If drag the mouse on it, it shows an empty frame on white background.
For example:
sage: f = lambda x, y: exp(-x**2-y**2)
sage: W = plot3d(f, (-2, 2), (-2, 2))
sage: show(W, figsize=8)
I tried all the options, with or without switch viewer="threejs".Tue, 28 Jul 2020 16:38:12 +0200https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/Comment by slelievre for <p>I installed sage 9.1, and also installed its kernel on Jupyter.
Everything other than <code>plot3d</code> works fine.</p>
<p>For <code>plot3d</code>, the behavior of 9.1 is same as 9.0, it shows a black background.
If drag the mouse on it, it shows an empty frame on white background.</p>
<p>For example:</p>
<pre><code>sage: f = lambda x, y: exp(-x**2-y**2)
sage: W = plot3d(f, (-2, 2), (-2, 2))
sage: show(W, figsize=8)
</code></pre>
<p>I tried all the options, with or without switch viewer="threejs".</p>
https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=55667#post-id-55667Similar reports (including this one):
- [Ask Sage question 52722](https://ask.sagemath.org/question/52722)
- [Stack Overflow question 66584781: Sage not displaying/Rendering 3D plots](https://stackoverflow.com/q/66584781)
- [Ask Sage question 55896: implicit_plot3d not rendering in Jupyter Lab](https://ask.sagemath.org/question/55896)
- [Ask Sage question 55661: plot3d shows a black window](https://ask.sagemath.org/question/55661)
- [Ask Sage question 52722: plot3d displaying black graph in jupyter for both 9.0 and 9.1](https://ask.sagemath.org/question/52722)
- [debian-science-sagemath, 2019-11: Consider updating package three.js](https://alioth-lists.debian.net/pipermail/debian-science-sagemath/2019-November/001583.html)Thu, 11 Feb 2021 00:59:40 +0100https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=55667#post-id-55667Comment by luqiyi@gmail.com for <p>I installed sage 9.1, and also installed its kernel on Jupyter.
Everything other than <code>plot3d</code> works fine.</p>
<p>For <code>plot3d</code>, the behavior of 9.1 is same as 9.0, it shows a black background.
If drag the mouse on it, it shows an empty frame on white background.</p>
<p>For example:</p>
<pre><code>sage: f = lambda x, y: exp(-x**2-y**2)
sage: W = plot3d(f, (-2, 2), (-2, 2))
sage: show(W, figsize=8)
</code></pre>
<p>I tried all the options, with or without switch viewer="threejs".</p>
https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52882#post-id-52882Linux xxx4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
x, y, z = var('x,y,z')
f = exp(-x**2-y**2)
W = plot3d(f,(x,-2,2),(y,-2,2), frame=True, color='yellow', opacity=0.7, viewer='threejs')
show(W, figsize=8)
same code worked on v8.1 fine.Thu, 06 Aug 2020 01:41:58 +0200https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52882#post-id-52882Comment by slelievre for <p>I installed sage 9.1, and also installed its kernel on Jupyter.
Everything other than <code>plot3d</code> works fine.</p>
<p>For <code>plot3d</code>, the behavior of 9.1 is same as 9.0, it shows a black background.
If drag the mouse on it, it shows an empty frame on white background.</p>
<p>For example:</p>
<pre><code>sage: f = lambda x, y: exp(-x**2-y**2)
sage: W = plot3d(f, (-2, 2), (-2, 2))
sage: show(W, figsize=8)
</code></pre>
<p>I tried all the options, with or without switch viewer="threejs".</p>
https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52895#post-id-52895I edited the question to add a simpler example with less options to `plot3d`.
Is that simpler example enough to trigger the bug?Thu, 06 Aug 2020 14:12:45 +0200https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52895#post-id-52895Comment by paulmasson for <p>I installed sage 9.1, and also installed its kernel on Jupyter.
Everything other than <code>plot3d</code> works fine.</p>
<p>For <code>plot3d</code>, the behavior of 9.1 is same as 9.0, it shows a black background.
If drag the mouse on it, it shows an empty frame on white background.</p>
<p>For example:</p>
<pre><code>sage: f = lambda x, y: exp(-x**2-y**2)
sage: W = plot3d(f, (-2, 2), (-2, 2))
sage: show(W, figsize=8)
</code></pre>
<p>I tried all the options, with or without switch viewer="threejs".</p>
https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52912#post-id-52912Can you get the plot to work with `viewer=“jmol”`?Sat, 08 Aug 2020 01:37:55 +0200https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52912#post-id-52912Comment by slelievre for <p>I installed sage 9.1, and also installed its kernel on Jupyter.
Everything other than <code>plot3d</code> works fine.</p>
<p>For <code>plot3d</code>, the behavior of 9.1 is same as 9.0, it shows a black background.
If drag the mouse on it, it shows an empty frame on white background.</p>
<p>For example:</p>
<pre><code>sage: f = lambda x, y: exp(-x**2-y**2)
sage: W = plot3d(f, (-2, 2), (-2, 2))
sage: show(W, figsize=8)
</code></pre>
<p>I tried all the options, with or without switch viewer="threejs".</p>
https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52903#post-id-52903Otherwise here is the fuller example from @luqiyi's comment again, slightly polished:
sage: f = lambda x, y: exp(-x**2 - y**2)
sage: opt = {'frame': True, 'color': 'yellow', 'opacity': 0.7, 'viewer': 'threejs'}
sage: W = plot3d(f, (-2, 2), (-2, 2), **opt)
sage: show(W, figsize=8)Fri, 07 Aug 2020 02:44:11 +0200https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52903#post-id-52903Comment by eric_g for <p>I installed sage 9.1, and also installed its kernel on Jupyter.
Everything other than <code>plot3d</code> works fine.</p>
<p>For <code>plot3d</code>, the behavior of 9.1 is same as 9.0, it shows a black background.
If drag the mouse on it, it shows an empty frame on white background.</p>
<p>For example:</p>
<pre><code>sage: f = lambda x, y: exp(-x**2-y**2)
sage: W = plot3d(f, (-2, 2), (-2, 2))
sage: show(W, figsize=8)
</code></pre>
<p>I tried all the options, with or without switch viewer="threejs".</p>
https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52920#post-id-52920I cannot reproduce the issue with Sage 9.1 running on Ubuntu 18.04 (Linux xxx 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux)Sun, 09 Aug 2020 12:26:29 +0200https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52920#post-id-52920Comment by slelievre for <p>I installed sage 9.1, and also installed its kernel on Jupyter.
Everything other than <code>plot3d</code> works fine.</p>
<p>For <code>plot3d</code>, the behavior of 9.1 is same as 9.0, it shows a black background.
If drag the mouse on it, it shows an empty frame on white background.</p>
<p>For example:</p>
<pre><code>sage: f = lambda x, y: exp(-x**2-y**2)
sage: W = plot3d(f, (-2, 2), (-2, 2))
sage: show(W, figsize=8)
</code></pre>
<p>I tried all the options, with or without switch viewer="threejs".</p>
https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52727#post-id-52727What operating system? How was Sage installed? What is the exact code that gives this problem? Does the same code work on [SageCell](https://sagecell.sagemath.org)? On [CoCalc](https://cocalc.com)?
Note: such a problem was previously reported:
- [debian-science-sagemath, 2019-11, Consider updating package three.js](https://alioth-lists.debian.net/pipermail/debian-science-sagemath/2019-November/001583.html)Tue, 28 Jul 2020 18:25:39 +0200https://ask.sagemath.org/question/52722/plot3d-displaying-black-graph-in-jupyter-for-both-90-and-91/?comment=52727#post-id-52727