Last active
August 29, 2015 14:24
-
-
Save trsqxyz/feaf48266a976b90188e to your computer and use it in GitHub Desktop.
plotly でいい感じのグラフをオンラインに公開する ref: http://qiita.com/trsqxyz/items/27b84bb72de5371b062d
This file contains 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.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') | |
This file contains 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
layout = Layout(title='basic-line') | |
fig = Figure(data=data, layout=layout) | |
py.image.save_as(fig, filename='fig.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment