当前位置: 首页 > news >正文

兰州微信信息平台网站建设/重庆网络seo

兰州微信信息平台网站建设,重庆网络seo,海曙网站制作,做的网站文字是乱码一直没有在意自己花了多少钱,我卡绑定了电话吧,取钱,支付宝什么的消费,过后都会短信通知,有时间准备统计一下,自己的情况。然后散点图,柱状图,折线图表示出来。x轴为时间&#xff0c…

一直没有在意自己花了多少钱,我卡绑定了电话吧,取钱,支付宝什么的消费,过后都会短信通知,有时间准备统计一下,自己的情况。

然后散点图,柱状图,折线图表示出来。

x轴为时间,y轴为钱数。

占位,等我有时间,把几百条短信整理出来,在作图。

import matplotlib.pyplot as plt

import numpy as np

#x=np.arange(1,13,1)

x=np.linspace(1,13,12,endpoint=True)

print(x)

t2=np.random.randint(700,1000,12)

print(t2)

plt.figure(figsize=(8,6))

plt.plot(x,t2,label="money-time",color="red",linestyle="--",linewidth=1.0)

#得到当前的绘图对象

ax=plt.gca()

ax.set_xlabel("time")

ax.set_ylabel("money")

ax.set_title("the time of spend money")

ax.spines["top"].set_color("none")

ax.spines["right"].set_color("none")

plt.grid(True)

plt.legend()

plt.savefig("suiji.jpg",dpi=230)

plt.show()

花费柱状图。

t3=np.random.randint(700,1000,12)

x=np.arange(1,13,1)

x_name=["Jan","feb","march","Apr","may","june","july","Aug","Sept","oct","Nov","Dece"]

plt.bar(x,t3,color="rgb",tick_label=x_name)

ax=plt.gca()

#ax.hist(x_name,t3)

ax.set_xlabel("time")

ax.set_ylabel("money")

ax.set_title("the time of spend money")

ax.spines["top"].set_color("none")

ax.spines["right"].set_color("none")

#plt.grid(True)

#plt.legend()

plt.savefig("zhuzt.jpg",dpi=230)

plt.show()

上面是随机生成的,这次把手机短信查看 了几十条,不过短信太多了,看的马马虎虎,数据随便做了几十条,我感觉不对。

import numpy as np

import pandas as pd

import matplotlib.pyplot as plt

f=pd.read_excel("my spend.xlsx")

f

结果如下

时间 金钱

0 2016-08-27 10

1 2016-09-04 30

2 2016-09-05 20

3 2016-09-30 185

4 2016-10-12 286

5 2016-11-11 4699

6 2016-11-19 27

7 2016-12-05 12

8 2016-12-12 149

9 2017-02-17 429

10 2017-03-29 900

11 2017-04-29 300

12 2017-05-25 50

13 2017-05-31 30

14 2017-06-28 217

15 2017-08-23 211

16 2017-08-25 5200

17 2017-09-06 210

18 2017-09-16 118

19 2017-09-18 300

20 2017-09-24 50

21 2017-09-27 30

22 2017-09-28 300

23 2017-10-02 300

24 2017-10-09 40

25 2017-10-17 500

26 2017-10-29 310

27 2017-10-31 505

28 2017-11-02 120

29 2017-11-03 300

30 2017-11-05 406

31 2017-11-11 80

32 2017-11-16 46

看一看,其相关数据

sum_money=f.sum()

print("all money:",sum_money)

print(len(f))

print(type(f))

print(f.values)

print(index)

all money: 金钱 16370

dtype: int64

33

[[Timestamp('2016-08-27 00:00:00') 10]

金钱的消费

t=f["金钱"]

print(t[3])

print(type(t))

ax=plt.gca()

ax.set_xlabel("time")

ax.set_ylabel("money")

ax.set_title("the time of spend money")

ax.spines["top"].set_color("none")

ax.spines["right"].set_color("none")

plt.grid(True)

#plt.legend()

t.plot()

plt.grid(True)

plt.savefig("money.jpg",dpi=230)

plt.show()

f=pd.read_excel("my spend.xlsx")

plt.plot(f.时间,f.金钱,color="r")

ax=plt.gca()

ax.set_xlabel("time")

ax.set_ylabel("money")

ax.set_title("the time of spend money")

ax.spines["top"].set_color("none")

ax.spines["right"].set_color("none")

plt.grid(True)

plt.savefig("money-time.jpg",dpi=230)

plt.show()

采用excel读取数据绘制的图像为

总的来说失败了,我的数据没有什么用,统计自己的消费也是好玩一下。绘图好像就是这样,没有多少技巧,使用轮子。

http://www.jmfq.cn/news/4995559.html

相关文章:

  • 邢台提供网站建设公司电话/汽车行业网站建设
  • 学生想搭建网站怎么做/我要发布信息
  • 如何创建一个html网页/科学新概念seo外链
  • jsp网站开发论文2017/岳阳网站设计
  • 平邑做网站/百度电商推广
  • 兰州网站建设与优化推广/网页设计个人网站
  • 上饶高端网站建设/万网
  • 网站建设 大公司小公司/网络推广软件免费
  • 做黄色网站会受到什么惩罚/精准引流推广团队
  • 宜昌营销网站建设/网络营销与直播电商专业学什么
  • 展示型网站建/站长seo综合查询
  • 做网站和做系统有什么不同/网站推广优化教程
  • 网站开发需要什么资质/博客推广的方法与技巧
  • 黔东南网站建设/关键词排名监控
  • 专业的深圳网站建设公司排名/人大常委会委员长
  • 如何用ps设计网站首页/化学sem是什么意思
  • 东莞优化网站建设/北京搜索引擎关键词优化
  • 公司做网站让拍照备案/站长之家官网
  • 苹果cms/广州seo诊断
  • javascriptjava免费观看/seo教学平台
  • 寻花问柳专注做一家男人爱的网站/百度发广告怎么发
  • 免费网站正能量入口下载/seo网站优化推广怎么样
  • 网站备案工信部/重庆seo技术教程博客
  • 针对网站开发软件 代替手动/网站收录优化
  • 简述网站规划的主要任务/优化资源配置
  • 怎么开发网站平台/seo推广公司
  • 跨境电商网站开发文档/提高工作效率的重要性
  • 做网站原型图/网站推广的软件
  • 网站临时会话/小程序开发一个多少钱啊
  • 别人帮做的网站到期续费/seo查询爱站网