Created
April 2, 2019 19:06
-
-
Save ostwalprasad/23cf30e877e2513ec15e2b0ef269e280 to your computer and use it in GitHub Desktop.
This file contains 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
#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