Created
September 10, 2018 01:03
-
-
Save jeffgreenca/6f231c888bc753100306edf9163bc4bb to your computer and use it in GitHub Desktop.
Plotly init script for Jupyter notebooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Plotly init for Jupyter - https://plot.ly/python/reference/ | |
from plotly.offline import init_notebook_mode, iplot | |
import plotly.graph_objs as go | |
init_notebook_mode(connected=True) | |
# Example (untested) | |
X = [1,2,3] | |
Y = [3,2,1] | |
trace0 = go.Scatter( x=X, y=Y ) | |
data = go.Data([trace0]) | |
layout = {"title": "hello"} | |
iplot(data, layout) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment