plot3d displaying black graph in jupyter for both 9.0 and 9.1

asked 2020-07-28 09:38:12 -0500

updated 2020-08-06 07:11:41 -0500

slelievre gravatar image

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".

edit retag flag offensive close merge delete

Comments

What operating system? How was Sage installed? What is the exact code that gives this problem? Does the same code work on SageCell? On CoCalc?

Note: such a problem was previously reported:

slelievre gravatar imageslelievre ( 2020-07-28 11:25:39 -0500 )edit

Linux 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(-x2-y2) 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.

luqiyi@gmail.com gravatar imageluqiyi@gmail.com ( 2020-08-05 18:41:58 -0500 )edit

I edited the question to add a simpler example with less options to plot3d.

Is that simpler example enough to trigger the bug?

slelievre gravatar imageslelievre ( 2020-08-06 07:12:45 -0500 )edit

Otherwise 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)
slelievre gravatar imageslelievre ( 2020-08-06 19:44:11 -0500 )edit

Can you get the plot to work with viewer=“jmol”?

paulmasson gravatar imagepaulmasson ( 2020-08-07 18:37:55 -0500 )edit