I use it with exactly the same example code in my first email:

import plotly.graph_objects as go

# Create traces
fig = go.Figure()

fig.add_trace(go.Scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16],
                mode='lines+markers',
                name='cool line',
                line=dict(color='red', width=4, dash='dash')))

fig.show(renderer='notebook')




Von: Jeff Zhang <zjf...@gmail.com>
Gesendet: Donnerstag, 20. Mai 2021 16:54
An: users <users@zeppelin.apache.org>
Betreff: Re: plotly plots in apache zeppelin

How do you use plotly in jupyter ? Do you use it in offline mode like this link 
?

https://www.tutorialspoint.com/plotly/plotly_plotting_inline_with_jupyter_notebook.htm



<uwe.bau...@dlr.de<mailto:uwe.bau...@dlr.de>> 于2021年5月20日周四 下午9:00写道:
Hi,

we are elaborating if apache zeppelin is a suitable tool for us for 
collaborative notebooks. So far, I am very happy. However, we often use plotly 
in our jupyter notebooks and I do not get plotly plots displayed in apache 
zeppelin.

I installed apache zeppelin 0.9.0. (binary package with all interpreters) on a 
Linux server and the python interpreter settings point to the python binary in 
a conda environment. This environment  contains pyspark and plotly 4.14.3.

My example code is:

%python

import plotly.io<http://plotly.io> as pio
pio.renderers.default = 'notebook'


# x and y given as array_like objects
import plotly.express as px
fig = px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16])
fig.show()


The result is an empty white output in zeppelin. Is plotly working in zeppelin 
and if so, what am I doing wrong? (sorry, if this question is a stupid one)

Any help is highly appreciated and If you need further information, please let 
me know.

Best regards,
Uwe


——————————————————————————
Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR)
Institut für Verbrennungstechnik | Mehrphasenströmungen und Alternative 
Treibstoffe | Pfaffenwaldring 38-40 | 70569 Stuttgart

Dr.-Ing. Uwe Bauder
Telefon +49 711 6862-422 | Telefax +49 711 6862-578 | 
uwe.bau...@dlr.de<mailto:uwe.bau...@dlr.de>
DLR.de<http://www.dlr.de/>



--
Best Regards

Jeff Zhang

Reply via email to