UCS2014 commited on
Commit
52606f2
·
verified ·
1 Parent(s): e046b13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -25,8 +25,8 @@ MODEL_FALLBACKS = [MODELS_DIR / "model.joblib", MODELS_DIR / "model.pkl"]
25
  COLORS = {"pred": "#1f77b4", "actual": "#f2b702", "ref": "#5a5a5a"}
26
 
27
  # ---- Plot sizing controls ----
28
- CROSS_W = 300 # px (matplotlib figure size; Streamlit will still scale)
29
- CROSS_H = 300
30
  TRACK_H = 1000 # px (plotly height; width auto-fits column)
31
  # NEW: Add a TRACK_W variable to control the width
32
  TRACK_W = 500 # px (plotly width)
@@ -263,9 +263,9 @@ def cross_plot_static(actual, pred):
263
  ax.xaxis.set_major_formatter(fmt)
264
  ax.yaxis.set_major_formatter(fmt)
265
 
266
- ax.set_xlabel("Actual UCS (psi)", fontweight="bold", fontsize=6, color="black")
267
- ax.set_ylabel("Predicted UCS (psi)", fontweight="bold", fontsize=6, color="black")
268
- ax.tick_params(labelsize=6, colors="black")
269
 
270
  ax.grid(True, linestyle=":", alpha=0.3)
271
  for spine in ax.spines.values():
@@ -330,8 +330,8 @@ def track_plot(df, include_actual=True):
330
  # Bold, black axis titles & ticks
331
  fig.update_xaxes(
332
  title_text="UCS (psi)",
333
- title_font=dict(size=16, family=BOLD_FONT, color="#000"),
334
- tickfont=dict(size=11, family=BOLD_FONT, color="#000"),
335
  side="top",
336
  range=[xmin, xmax],
337
  ticks="outside",
@@ -343,8 +343,8 @@ def track_plot(df, include_actual=True):
343
  )
344
  fig.update_yaxes(
345
  title_text=ylab,
346
- title_font=dict(size=16, family=BOLD_FONT, color="#000"),
347
- tickfont=dict(size=11, family=BOLD_FONT, color="#000"),
348
  range=y_range,
349
  ticks="outside",
350
  showline=True, linewidth=1.2, linecolor="#444", mirror=True,
 
25
  COLORS = {"pred": "#1f77b4", "actual": "#f2b702", "ref": "#5a5a5a"}
26
 
27
  # ---- Plot sizing controls ----
28
+ CROSS_W = 200 # px (matplotlib figure size; Streamlit will still scale)
29
+ CROSS_H = 200
30
  TRACK_H = 1000 # px (plotly height; width auto-fits column)
31
  # NEW: Add a TRACK_W variable to control the width
32
  TRACK_W = 500 # px (plotly width)
 
263
  ax.xaxis.set_major_formatter(fmt)
264
  ax.yaxis.set_major_formatter(fmt)
265
 
266
+ ax.set_xlabel("Actual UCS (psi)", fontweight="bold", fontsize=8, color="black")
267
+ ax.set_ylabel("Predicted UCS (psi)", fontweight="bold", fontsize=8, color="black")
268
+ ax.tick_params(labelsize=4, colors="black")
269
 
270
  ax.grid(True, linestyle=":", alpha=0.3)
271
  for spine in ax.spines.values():
 
330
  # Bold, black axis titles & ticks
331
  fig.update_xaxes(
332
  title_text="UCS (psi)",
333
+ title_font=dict(size=20, family=BOLD_FONT, color="#000"),
334
+ tickfont=dict(size=15, family=BOLD_FONT, color="#000"),
335
  side="top",
336
  range=[xmin, xmax],
337
  ticks="outside",
 
343
  )
344
  fig.update_yaxes(
345
  title_text=ylab,
346
+ title_font=dict(size=20, family=BOLD_FONT, color="#000"),
347
+ tickfont=dict(size=15, family=BOLD_FONT, color="#000"),
348
  range=y_range,
349
  ticks="outside",
350
  showline=True, linewidth=1.2, linecolor="#444", mirror=True,