question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add plot config options to display bundle so they are available to JupyterLab and nteract

See original GitHub issue

Hello,

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:open
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
rysktkycommented, Jun 5, 2018

i guess this works to avoid online features completely.

config = {'showLink': False, 'displaylogo':False, 'modeBarButtonsToRemove':['sendDataToCloud']}

0reactions
jonmmeasecommented, Sep 23, 2018

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 in offline.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 the data/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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found