ClarzW commited on
Commit
5bfa5d8
·
verified ·
1 Parent(s): 498d547

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -93,10 +93,10 @@ if viz_button:
93
  fig, ax = plt.subplots(figsize=(10,6))
94
  ax.plot(expenses_by_month.index, expenses_by_month['Amount'], marker='o')
95
  ax.set_title("Expenses Over Time", pad=20) # Title for the line chart
96
- ax.set_ylabel("Amount Spent (£)", labelpad=5) # Y-axis label
97
 
98
  # Adding labels to each point
99
- for date, amount in expenses_over_time.items():
100
  ax.text(date, amount + 0.05, f'{amount:.2f}', ha='right')
101
 
102
  plt.xticks(rotation=45)
 
93
  fig, ax = plt.subplots(figsize=(10,6))
94
  ax.plot(expenses_by_month.index, expenses_by_month['Amount'], marker='o')
95
  ax.set_title("Expenses Over Time", pad=20) # Title for the line chart
96
+ ax.set_ylabel("Amount Spent (£)", labelpad=15) # Y-axis label
97
 
98
  # Adding labels to each point
99
+ for date, amount in zip(expenses_by_month['Date'], expenses_by_month['Amount']):
100
  ax.text(date, amount + 0.05, f'{amount:.2f}', ha='right')
101
 
102
  plt.xticks(rotation=45)