Add plot config options to display bundle so they are available to JupyterLab and nteract
See original GitHub issueHello,
I’m currently working on data that cannot go online. I noticed the other day a button “edit in Chart Studio”. I tried to remove it using this tutorial in your documentation: https://plot.ly/python/configuration-options/ but even with the following code:
config={'showLink': False}
iplot(data, config=config)
the button stays.
Is there a step that I forgot ? I’d really appreciate some help to remove it.
Thank you,
Michael
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Displaying figures in Python - Plotly
Plotly's Python graphing library, plotly.py , gives you a wide range of options for how and where to display your figures. In general,...
Read more >Displaying Altair Charts — Altair 4.2.0 documentation
Altair charts work out-of-the-box on Jupyter Notebook, JupyterLab, Zeppelin, and related notebook environments, so long as there is a web connection to load ......
Read more >Getting started - nteract
This user guide prepares you for setting up the basics of the nteract notebook app. ... Open, create, and edit notebooks as well...
Read more >Extension Developer Guide — JupyterLab 1.2.21 documentation
libraryTarget to "commonjs2" in your Webpack configuration. (see this example repo). If you publish your extension on npm.org , users will be able...
Read more >Ipywidgets with matplotlib - Kapernikov
A simple use case could be adding some basic controls to a plot for ... Therefore, if you have problems displaying plots correctly, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i guess this works to avoid online features completely.
config = {'showLink': False, 'displaylogo':False, 'modeBarButtonsToRemove':['sendDataToCloud']}
Thanks for digging into this @MichaelHalfon and @rysktky. @rysktky 's solution above is the right way to handle this in
offline.iplot
in the classic notebook, and inoffline.plot
from anywhere.For
offline.iplot
in JupyterLab things work a bit differently, in this case plotly.py doesn’t construct the raw HTML to render the figure, but instead passes thedata
/layout
/frames
data structure to the front end in a display bundle, and this is then rendered by the@jupyterlab/plotly-extension
extension. At the moment, the config options aren’t included in the display bundle and so they aren’t available to@jupyterlab/plotly-extension
.To support this, plotly.py will need to add the config options to the display bundle data structure and
@jupyterlab/plotly-extension
will need to check for the presence of config options before creating the plot. Similarly, to support config options in nteract, the nteract renderer would need to check for these options as well.