How to use dash within Jupyter notebook or JupyterLab?

前端 未结 4 1607
Happy的楠姐
Happy的楠姐 2021-01-31 18:08

Is it possible to have a dash app within a Jupyter Notebook, rather than served up and viewed in a browser?

My intention is to link graphs within a Jupyter notebook so t

4条回答
  •  时光说笑
    2021-01-31 18:26

    Look for plotly offline.

    Say you have a figure (e.g. fig = {'data': data, 'layout':layout} )

    Then, inside a jupyter notebook cell,

    from plotly.offline import iplot, init_notebook_mode
    init_notebook_mode()
    # plot it
    iplot(fig)
    

    This will plot the plotly inside your jupyter. You dont even have to run the flask server.

提交回复
热议问题