I have installed plotly into a new Jupyter environment in mamba. When I attempt to run an example program from the plotly webpage within Jupyter, a blank output cell is created, but no graphics are visible. Taking an example from the gallery on plotly as shown below and running it in Jupyter results in a blank cell being created. Changing the last line from fig.show() to fig.show(renderer=βiframeβ) (as suggest by someone using Google search results in what appears to be the correct (interactive) graphic output. What is going on and how can I fix this problem. Note the person who gave the suggestion I referenced had no idea why it worked either, although he mentioned that several different renderer options worked as well as βiframeβ
import plotly.graph_objects as go
import numpy as np
X, Y, Z = np.mgrid[-8:8:40j, -8:8:40j, -8:8:40j]
values = np.sin(X*Y*Z) / (X*Y*Z)
fig = go.Figure(data=go.Volume(
x=X.flatten(),
y=Y.flatten(),
z=Z.flatten(),
value=values.flatten(),
isomin=0.1,
isomax=0.8,
opacity=0.1, # needs to be small to see through all surfaces
surface_count=17, # needs to be a large number for good volume rendering
))
fig.show()