<Python, plotly> Open-source

plotlyOpen-sourceになったらしい。

plot.ly

つうことで、offlineを試してみる。

plot.ly

ipython notebookを立ち上げて、

In [13]: from plotly import __version__
         from plotly.offline import download_plotlyjs, init_notebook_mode, iplot
         plotly.__version__

Out[13]: '1.9.3'

In [14]: init_notebook_mode()

In [15]: import plotly.graph_objs as go
         import numpy as np

         N = 1000
         random_x = np.random.randn(N)
         random_y = np.random.randn(N)
         trace = go.Scatter( x = random_x, y = random_y, mode = 'markers' )
         data = [trace]

         # Plot and embed in ipython notebook!
         iplot(data)
         #py.iplot(data, filename='basic-scatter')

f:id:nekoyukimmm:20151214141026p:plain

いいねー。