-
-
Save trsqxyz/d78b3d55a4b27178d4cd to your computer and use it in GitHub Desktop.
plotly でいい感じのグラフをつくる ref: http://qiita.com/trsqxyz/items/d797919c19ee6c49ae72
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
trace = Bar(x=list(range(10)), y=list(np.random.randint(0,30,10))) | |
data = Data([trace]) | |
py.image.save_as(data, filename='bar.png') |
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
trace = Scatter( | |
x=list(range(8)), | |
y=list(np.random.randint(0,10,8)), | |
fill='tonexty', | |
mode='none' | |
) | |
trace2 = Scatter( | |
x=list(range(8)), | |
y=list(np.random.randint(0,10,8)), | |
fill='tonexty', | |
mode='none' | |
) | |
data = Data([trace, trace2]) | |
py.image.save_as(data, 'field_area_plots.png') |
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
trace = Heatmap( | |
z=[np.random.randint(1,50,50) for _ in range(50)], | |
colorscale='YIGnBu', | |
) | |
data = Data([trace]) | |
py.image.save_as(data, filename='heatmap.png') |
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
trace = Histgram(x=np.random.randn(500)) | |
data = Data([trace]) | |
py.image.save_as(data, filename='histogram.png') |
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
trace = Bar(x=list(range(8)), y=list(np.random.randint(0,10,8))) | |
trace2 = Scatter(x=list(range(8)), y=list(np.random.randint(0,10,8))) | |
data = Data([trace, trace2]) | |
py.image.save_as(data, filename='multiple.png') |
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 * | |
trace = Scatter(x=list(range(10)), y=list(np.random.randint(0,30,10))) | |
data = Data([trace]) | |
py.image.save_as(data, filename='scatter.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment