plot3d displaying black graph in jupyter for both 9.0 and 9.1

asked 4 years ago

updated 4 years ago

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

Preview: (hide)

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 ( 4 years ago )

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 ( 4 years ago )

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 ( 4 years ago )

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 ( 4 years ago )

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

paulmasson gravatar imagepaulmasson ( 4 years ago )