Skip to content

Commit 255713f

Browse files
committed
BUG: Use only integer xaxis in convergence and regret plots
1 parent 7302fe4 commit 255713f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sambo/plot.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ def _set_xscale_yscale(ax, xscale, yscale):
110110
xscale = 'symlog'
111111
kw = {'linthresh': 1}
112112
ax.set_xscale(xscale, **kw)
113+
if xscale == 'linear':
114+
# Override for convergence and regret plots where X is nfev
115+
# NOTE: Need this AFTER ax.set_xscale()
116+
ax.xaxis.set_major_locator(MaxNLocator(integer=True))
113117
kw = {}
114118
if yscale in ('log', 'symlog'):
115119
yscale = 'symlog'

0 commit comments

Comments
 (0)