Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- balance = {'08.12.16': 637.22,
- '09.16.16': 1633.43,
- '09.19.16': 983.43,
- '09.23.16': 1274.38,
- '09.29.16': 1114.38,
- '09.30.16': 1699.75}
- #I manually entered my information into a dictionary because I only had a few months worth of information but I'm sure I
- # could have just as easily used f = open('somefile.txt', 'r') or something of the kind...
- key = list(dict.keys(balance))
- val = list(balance.values())
- plt.bar(range(len(balance)), balance.values(), align='center', color = 'blue')
- plt.xticks(range(0, 68), key, rotation=45)
- plt.title('FINANCES', color= 'red')
- plt.margins(0.01)
- plt.subplots_adjust(bottom=0.3)
- plt.text(2, 1500, 'RAPIDR3D_FINANCE', style='italic',
- bbox={'facecolor':'red', 'alpha':0.5, 'pad':10})
- plt.xlabel('Dates', color ='red')
- plt.tick_params(axis='x', colors='red')
- plt.ylabel('Dollars', color ='green')
- plt.tick_params(axis='y', colors='green')
- plt.tight_layout()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement