Skip to content

Commit 59bda55

Browse files
committed
better
1 parent 6eb74d1 commit 59bda55

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

app.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
import math
2323

2424
# --- Sidebar configuration with hover tooltips ---
25+
st.sidebar.title("Configuration")
26+
# Fullscreen option for plots
27+
fullscreen = st.sidebar.checkbox(
28+
"Fullscreen plots",
29+
False,
30+
help="Toggle to display plots in full container width/height for detail."
31+
)
32+
2533
st.sidebar.title("Configuration")
2634
# Dataset selection
2735
dataset_name = st.sidebar.selectbox(
@@ -226,7 +234,8 @@ def get_data(name):
226234
Z = (Z_raw>0).astype(int).reshape(xx.shape)
227235
else:
228236
Z = Z_raw.reshape(xx.shape)
229-
plt.figure(figsize=(6,4))
237+
fig_w, fig_h = (12, 8) if fullscreen else (4, 3)
238+
plt.figure(figsize=(fig_w, fig_h))
230239
plt.contourf(xx, yy, Z, alpha=0.3)
231240
plt.scatter(x_vis[:,0], x_vis[:,1], c=y_train, edgecolor='k', s=20)
232241
plt.title(name)

0 commit comments

Comments
 (0)