Ce notebook est une très courte introduction à plotly. Quelques liens utiles :
Important : Par défaut plotly communique avec ses serveurs pour proposer des
sercices collaboratifs et d'intégrations web. Pour éviter, si besoin, se passage
par les serveurs plotly, il faudra penser à utiliser le mode offline.
In [1]:
import plotly
import plotly.graph_objs as go
import numpy as np
# mode offline
plotly.offline.init_notebook_mode()
In [2]:
def signal(t):
return np.sin(2 * t) * np.exp(-4e-2 * t)
def envelope(t):
return np.exp(-4e-2 * t)
In [3]:
t = np.linspace(0, 80, 200)
trace = go.Scatter(
x = t,
y = signal(t),
)
data = go.Data([trace])
plotly.offline.iplot(data)
plotly.plotly.image.save_as(data, "/Users/gvallver/git/python_sciences/plotly/graph1.png")