Skip to content

Commit 80e977c

Browse files
committed
Fix xlim bounds
1 parent e7ea23f commit 80e977c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

panel/simdec.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,8 @@ def display_n_bins(kind):
201201

202202

203203
@pn.cache
204-
def xlim_auto(res):
205-
bins = np.concatenate(res.bin_edges)
206-
return (np.min(bins), np.max(bins))
204+
def xlim_auto(output):
205+
return (np.nanmin(output) * 0.95, np.nanmax(output) * 1.05)
207206

208207

209208
@pn.cache
@@ -354,7 +353,7 @@ def csv_data(
354353
visible=show_n_bins,
355354
)
356355

357-
interactive_xlim = pn.rx(xlim_auto)(interactive_decomposition)
356+
interactive_xlim = pn.rx(xlim_auto)(interactive_output)
358357
selector_xlim = pn.widgets.EditableRangeSlider(
359358
name="X-lim",
360359
start=interactive_xlim.rx()[0],

0 commit comments

Comments
 (0)