Publish nice graphs online with plotly

I think it's good to create staggered pages with Jupyter, but you can use it when you just want a graph

https://plot.ly/

Read this

-[Try Plotly that can visualize data on the Web with R --Dimension Planet Adventure Final Chapter Final Episode "Glorious Future"](http://ksmzn.hatenablog.com/entry/2013/12/12/ 000100) -Make: Japan | Data Streaming with Plotly

How to use

Get api_key because you need it to use You can use a github account for signup Once you get the api_key pip install plotly
Then .plotly \ .credentials will be created, so set username and api_key there.

Do this Getting Started Plotly for Python

import plotly.plotly as py
from plotly.graph_objs import *

trace0 = Scatter(
    x=[1, 2, 3, 4],
    y=[10, 15, 13, 17]
)

trace1 = Scatter(
    x=[1, 2, 3, 4],
    y=[16, 5, 11, 9]
)

data = Data([trace0, trace1])
unique_url = py.plot(data, filename = 'basic-line')

The URL is issued with py.plot and the page opens https://plot.ly/~trsqxyz/3

Convenient because you can read data and code The image is beautiful so I wish I could do it locally 2015/07/14 10:10

layout = Layout(title='basic-line')
fig = Figure(data=data, layout=layout)
py.image.save_as(fig, filename='fig.png')

I was able to save locally with

Recommended Posts

Publish nice graphs online with plotly
Make a nice graph with plotly
Application of graphs with plotly sliders
Candlestick with plotly + Jupyter
3D display with plotly
Overlay graphs with sympy
Candle chart plot with plotly
Use directional graphs with networkx
Create graph with plotly button
Real-time graphs on Plotly (Python)
Animate multiple graphs with matplotlib