dlaj commited on
Commit
b2b4a5b
·
verified ·
1 Parent(s): 1d7379c

Update streamlit_simulation/app.py

Browse files
Files changed (1) hide show
  1. streamlit_simulation/app.py +2 -1
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=True, facecolor=PLOT_COLOR)
 
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="--")