Skip to content

Embedding PlotlyJS in Jupyter Notebooks #20

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
arnavs opened this issue Mar 5, 2016 · 4 comments
Closed

Embedding PlotlyJS in Jupyter Notebooks #20

arnavs opened this issue Mar 5, 2016 · 4 comments

Comments

@arnavs
Copy link
Contributor

arnavs commented Mar 5, 2016

What's the best way to do this? It looks like there's an offline mode for Python that we can use with Jupyter, but I didn't find anything similar for Julia.

Update: Here's what it looks like when you view the raw plot() output in GitHub. The plot renders naturally as output in the Jupyter notebook.

screen shot 2016-03-05 at 3 25 49 pm

@sglyon
Copy link
Contributor

sglyon commented Mar 7, 2016

Embedding should be automatic. You might try to do using PlotlyJS and the plot command in a different cell. It might be that we aren't giving enough time for the javascript to load before we try to plot with it.

I don't know for sure if that will work, but that's my hunch. I've never had a problem in the notebook.

Let me know how it goes

@arnavs
Copy link
Contributor Author

arnavs commented Mar 8, 2016

Sounds good.

In that case, I'm thinking it's a GitHub thing (sometimes it displays features of Jupyter notebooks, like LaTeX, weirdly). The plots actually looked fine on my machine even with the setup above, they just took a second to spin up.

Thanks for looking into it.

@sglyon
Copy link
Contributor

sglyon commented Mar 8, 2016

Oh yeah github definitely won't show it.

Github doesn't render any external javascript, and that's how we show our plots. If you want to see it in a notebook online you should use nbviewer (just give them the link to the notebook on github)

@arnavs
Copy link
Contributor Author

arnavs commented Mar 8, 2016

Ah gotcha. Ok, sweet.

@arnavs arnavs closed this as completed Jun 27, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants