Spaces:
Runtime error
Runtime error
Update core/plot.py
Browse files- core/plot.py +8 -8
core/plot.py
CHANGED
|
@@ -14,14 +14,14 @@ def plot_forecast(result):
|
|
| 14 |
ax.plot(actual, label="Actual", color="blue", linewidth=2)
|
| 15 |
ax.plot(forecast, label="Forecast", color="orange", linestyle="--", linewidth=2)
|
| 16 |
|
| 17 |
-
if next_pred:
|
| 18 |
-
ax.scatter(range(len(actual), len(actual) + len(next_pred)), next_pred, color="red", label="Next Prediction(s)", zorder=5)
|
| 19 |
-
for i, val in enumerate(next_pred):
|
| 20 |
-
ax.text(
|
| 21 |
-
len(actual) + i, val, f"{val:.2f}",
|
| 22 |
-
color="red", fontsize=8, ha='center', va='bottom',
|
| 23 |
-
bbox=dict(facecolor='white', alpha=0.8, edgecolor='red', boxstyle='round,pad=0.3')
|
| 24 |
-
)
|
| 25 |
|
| 26 |
ax.legend()
|
| 27 |
ax.set_title("Actual vs Forecasted Values")
|
|
|
|
| 14 |
ax.plot(actual, label="Actual", color="blue", linewidth=2)
|
| 15 |
ax.plot(forecast, label="Forecast", color="orange", linestyle="--", linewidth=2)
|
| 16 |
|
| 17 |
+
#if next_pred:
|
| 18 |
+
#ax.scatter(range(len(actual), len(actual) + len(next_pred)), next_pred, color="red", label="Next Prediction(s)", zorder=5)
|
| 19 |
+
#for i, val in enumerate(next_pred):
|
| 20 |
+
#ax.text(
|
| 21 |
+
#len(actual) + i, val, f"{val:.2f}",
|
| 22 |
+
#color="red", fontsize=8, ha='center', va='bottom',
|
| 23 |
+
#bbox=dict(facecolor='white', alpha=0.8, edgecolor='red', boxstyle='round,pad=0.3')
|
| 24 |
+
#)
|
| 25 |
|
| 26 |
ax.legend()
|
| 27 |
ax.set_title("Actual vs Forecasted Values")
|