de-Rodrigo commited on
Commit
ed9740d
·
1 Parent(s): f648357
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -1547,9 +1547,17 @@ def run_model(model_name):
1547
  nan_color='rgba(0, 0, 0, 0)'
1548
  )
1549
 
 
 
 
 
 
 
 
 
1550
  # Figura heatmap
1551
  heatmap_fig = figure(title=f"Heatmap de '{selected_feature}' ({x_comp} vs {y_comp})",
1552
- x_range=(x_min, x_max), y_range=(y_min, y_max),
1553
  width=600, height=600,
1554
  tools="pan,wheel_zoom,reset,save", active_scroll="wheel_zoom", tooltips=TOOLTIPS,
1555
  sizing_mode="fixed")
 
1547
  nan_color='rgba(0, 0, 0, 0)'
1548
  )
1549
 
1550
+ x_min, x_max = df_heatmap[x_comp].min(), df_heatmap[x_comp].max()
1551
+ y_min, y_max = df_heatmap[y_comp].min(), df_heatmap[y_comp].max()
1552
+
1553
+ # opcional: ampliar un poco para que no quede todo pegado al borde
1554
+ padding = 0.05
1555
+ x_range = (x_min - padding, x_max + padding)
1556
+ y_range = (y_min - padding, y_max + padding)
1557
+
1558
  # Figura heatmap
1559
  heatmap_fig = figure(title=f"Heatmap de '{selected_feature}' ({x_comp} vs {y_comp})",
1560
+ x_range=x_range, y_range=y_range,
1561
  width=600, height=600,
1562
  tools="pan,wheel_zoom,reset,save", active_scroll="wheel_zoom", tooltips=TOOLTIPS,
1563
  sizing_mode="fixed")