一直没有在意自己花了多少钱,我卡绑定了电话吧,取钱,支付宝什么的消费,过后都会短信通知,有时间准备统计一下,自己的情况。
然后散点图,柱状图,折线图表示出来。
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)