Skip to content

Commit

Permalink
Believe the force
Browse files Browse the repository at this point in the history
  • Loading branch information
Strilanc committed Aug 7, 2024
1 parent 88c1e4e commit 98b47e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion glue/sample/src/sinter/_command/_main_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,16 +484,24 @@ def _set_axis_scale_label_ticks(
elif scale_name == 'log':
set_scale('log')
min_v, max_v, major_ticks, minor_ticks = _log_ticks(min_v, max_v)
if forced_min_v is not None:
min_v = forced_min_v
if forced_max_v is not None:
max_v = forced_max_v
set_ticks(major_ticks)
set_ticks(minor_ticks, minor=True)
set_lim(min_v, max_v)
elif scale_name == 'sqrt':
from matplotlib.scale import FuncScale
min_v, max_v, major_ticks, minor_ticks = _sqrt_ticks(min_v, max_v)
set_lim(min_v, max_v)
if forced_min_v is not None:
min_v = forced_min_v
if forced_max_v is not None:
max_v = forced_max_v
set_scale(FuncScale(ax, (lambda e: e**0.5, lambda e: e**2)))
set_ticks(major_ticks)
set_ticks(minor_ticks, minor=True)
set_lim(min_v, max_v)
else:
raise NotImplemented(f'{scale_name=}')
return scale_name
Expand Down
2 changes: 1 addition & 1 deletion glue/sample/src/sinter/_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def get(self, item, alternate = None):
return self._v.get(item, alternate)

def __str__(self):
return " ".join(v for _, v in sorted(self._v.items()))
return " ".join(str(v) for _, v in sorted(self._v.items()))


def plot_discard_rate(
Expand Down

0 comments on commit 98b47e8

Please sign in to comment.