Skip to content

Instantly share code, notes, and snippets.

@ostwalprasad
Created April 2, 2019 19:06
Show Gist options
  • Save ostwalprasad/23cf30e877e2513ec15e2b0ef269e280 to your computer and use it in GitHub Desktop.
Save ostwalprasad/23cf30e877e2513ec15e2b0ef269e280 to your computer and use it in GitHub Desktop.
#Import modules
import plotly
import plotly.graph_objs as go
#Make Plotly figure
fig1 = go.Scatter(x=data['curb-weight'],
y=data['price'],
mode='markers')
#Make Plot.ly Layout
mylayout = go.Layout(xaxis=dict(title="curb-weight"),
yaxis=dict( title="price"))
#Plot and save html
plotly.offline.plot({"data": [fig1],
"layout": mylayout},
auto_open=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment