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_default_locators_and_formatters(self, axis):
"""
Set the locators and formatters to specialized versions for
log scaling.
"""
axis.set_major_locator(FixedLocator(self._get_probs(1e8, self.as_pct)))
if self.as_pct:
axis.set_major_formatter(FuncFormatter(PctFormatter()))
else:
axis.set_major_formatter(FuncFormatter(ProbFormatter()))
axis.set_minor_locator(NullLocator())
axis.set_minor_formatter(NullFormatter())