Spaces:
Sleeping
Sleeping
Update streamlit_simulation/app.py
Browse files
streamlit_simulation/app.py
CHANGED
@@ -194,7 +194,8 @@ def init_simulation_layout():
|
|
194 |
|
195 |
def create_prediction_plot(pred_timestamps, pred_vals, true_timestamps, true_vals, window_hours, y_min=None, y_max=None):
|
196 |
"""Generates the matplotlib figure for plotting prediction vs. actual."""
|
197 |
-
fig, ax = plt.subplots(figsize=(8, 5), constrained_layout=
|
|
|
198 |
ax.set_facecolor(PLOT_COLOR)
|
199 |
|
200 |
ax.plot(pred_timestamps[-window_hours:], pred_vals[-window_hours:], label="Prediction", color="#EF233C", linestyle="--")
|
|
|
194 |
|
195 |
def create_prediction_plot(pred_timestamps, pred_vals, true_timestamps, true_vals, window_hours, y_min=None, y_max=None):
|
196 |
"""Generates the matplotlib figure for plotting prediction vs. actual."""
|
197 |
+
fig, ax = plt.subplots(figsize=(8, 5), constrained_layout=False, facecolor=PLOT_COLOR)
|
198 |
+
fig.tight_layout()
|
199 |
ax.set_facecolor(PLOT_COLOR)
|
200 |
|
201 |
ax.plot(pred_timestamps[-window_hours:], pred_vals[-window_hours:], label="Prediction", color="#EF233C", linestyle="--")
|