Spaces:
Build error
Build error
Update app.py
Browse files
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=
|
| 97 |
|
| 98 |
# Adding labels to each point
|
| 99 |
-
for date, amount in
|
| 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)
|