Last active
March 17, 2019 15:24
-
-
Save ostwalprasad/20bdb39a0b7951161887a83edb4ee6a9 to your computer and use it in GitHub Desktop.
2D PLot
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 plotly.graph_objs as go | |
import plotly | |
import pandas as pd | |
data = pd.read_csv("my_data.csv") | |
fig1 = go.Scatter(x=data['rpm'], | |
y=data['speed'], | |
mode='markers', | |
marker=dict(size=10, | |
line=dict(color='rgba(217, 217, 217, 0.14)', | |
width=0.2), | |
opacity=0.8, | |
color='blue'), | |
name="trace1") | |
mylayout = go.Layout(title="2D Plot", | |
scene=dict( | |
xaxis=dict( | |
title="RPM"), | |
yaxis=dict( | |
title="Speed") ), | |
) | |
plotly.offline.plot({"data": [fig1], | |
"layout": mylayout}, | |
auto_open=True, | |
filename=("Plot3D_3_features")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment