python计算消费总额_python统计一下自己的花费

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

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

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)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值