Skip to content

Commit

Permalink
Update ipywidget slider method
Browse files Browse the repository at this point in the history
  • Loading branch information
lang-m committed Jul 9, 2024
1 parent a60f377 commit a5d5807
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ubermagtable/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,8 @@ def slider(self, x=None, multiplier=None, description=None, **kwargs):
multiplier = ubermagutil.units.si_multiplier(self.xmax)

values = self.data[self.x].to_numpy()
labels = np.around(values / multiplier, decimals=2)
labels = np.around(values / multiplier, decimals=2).tolist()
values = values.tolist()
options = list(zip(labels, values))

units = f" ({ubermagutil.units.rsi_prefixes[multiplier]}s)" if x == "t" else ""
Expand Down

0 comments on commit a5d5807

Please sign in to comment.