Skip to content

Instantly share code, notes, and snippets.

@rhettallain
Created December 18, 2013 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rhettallain/8029989 to your computer and use it in GitHub Desktop.
Save rhettallain/8029989 to your computer and use it in GitHub Desktop.
Here is a python code to make a simple plot in plotly
import plotly
py = plotly.plotly(username='**username**', key='**put your api key here**')
y=0
t=0
dt=0.01
g=9.8
v=4
yp=[]
tp=[]
while y>=0:
v=v-g*dt
y=y+v*dt
t=t+dt
yp=yp+[y]
tp=tp+[t]
response=py.plot(tp,yp)
url=response['url']
filename=response['filename']
print(url)
print(filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment