-
-
Save tianqig/8aca89b996321c298afe222876c7e705 to your computer and use it in GitHub Desktop.
Here is a python code to make a simple plot in plotly
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
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