码迷,mamicode.com
首页 > 编程语言 > 详细

plot bar chart using python

时间:2016-12-15 07:35:22      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:image   class   src   tps   pre   find   lib   idt   chart   

Example

import matplotlib.pyplot as plt

import plotly.plotly as py
# Learn about API authentication here: https://plot.ly/python/getting-started
# Find your api_key here: https://plot.ly/settings/api

y = [3, 10, 7, 5, 3, 4.5, 6, 8.1]
N = len(y)
x = range(N)
width = 1/1.5
plt.bar(x, y, width, color="blue")

fig = plt.gcf()
#plot_url = py.plot_mpl(fig, filename=‘mpl-basic-bar‘)
plt.show()

 技术分享

plot bar chart using python

标签:image   class   src   tps   pre   find   lib   idt   chart   

原文地址:http://www.cnblogs.com/casperwin/p/6181808.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!