Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def set_nbins(self, nbinsx=None, nbinsy=None):
"""Change the number of bins on the x and y axes."""
nbinsx = self._bins_margin * nbinsx if _is_integer(nbinsx) else self._default_nbinsx
nbinsy = self._bins_margin * nbinsy if _is_integer(nbinsy) else self._default_nbinsy
self.locx = MaxNLocator(nbins=nbinsx, steps=self._default_steps)
self.locy = MaxNLocator(nbins=nbinsy, steps=self._default_steps)
def set_nbins(self, nbinsx=None, nbinsy=None):
"""Change the number of bins on the x and y axes."""
nbinsx = self._bins_margin * nbinsx if _is_integer(nbinsx) else self._default_nbinsx
nbinsy = self._bins_margin * nbinsy if _is_integer(nbinsy) else self._default_nbinsy
self.locx = MaxNLocator(nbins=nbinsx, steps=self._default_steps)
self.locy = MaxNLocator(nbins=nbinsy, steps=self._default_steps)
def select(self, ids, callback=None, **kwargs):
"""Select some rows in the table from Python.
This function calls `table.select()` in Javascript, which raises a Javascript event
relayed to Python. This sequence of actions is the same when the user selects
rows directly in the HTML view.
"""
ids = _uniq(ids)
assert all(_is_integer(_) for _ in ids)
self.eval_js('table.select({}, {});'.format(dumps(ids), dumps(kwargs)), callback=callback)