0

I need to include this graph https://plot.ly/~ekirzhner/6/ into my Jupiter Notebook. How to proceed? Thanks

2
  • Do you want it to be an interactive graph? Or do you just want to load a png or jpeg image of the graph into jupyter notebook? Commented Dec 8, 2017 at 23:57
  • @David Rosenman Interactive html graph Commented Dec 8, 2017 at 23:58

1 Answer 1

1

Click on "share" at the bottom right of the image. If you embed it as an iframe, use a code cell. You'll get an interactive graph if you copy and paste this code into the cell.

import IPython
iframe = '<iframe width="900" height="800" frameborder="0" scrolling="no" src="//plot.ly/~ekirzhner/6.embed"></iframe>'
IPython.display.HTML(iframe)

To import a static graph using html, in a markdown cell, use the following code:

%%html

<div>
    <a href="https://plot.ly/~ekirzhner/6/" target="_blank" title="Plot 6" style="display: block; text-align: center;"><img src="https://plot.ly/~ekirzhner/6.png" alt="Plot 6" style="max-width: 100%;width: 600px;"  width="600" onerror="this.onerror=null;this.src='https://plot.ly/404.png';" /></a>

I created a notebook file that contains a static graph from the html option plus a cell with the interactive plotly graph that you can download here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.