首页 > 编程语言 > 详细

plot bar chart using python

时间:2016-12-15 07:32:13      阅读:265      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!