SciFormatter

class SciFormatter(precision=None, zerotrim=None)[source]

Bases: matplotlib.ticker.Formatter

Format numbers with scientific notation.

Parameters
  • precision (int, optional) – The maximum number of digits after the decimal point. Default is 6 when zerotrim is True and 2 otherwise.

  • zerotrim (bool, optional) – Whether to trim trailing decimal zeros. Default is rc['formatter.zerotrim'] = True.

Methods Summary

__call__(x[, pos])

Convert number to a string.