SimpleFormatter(*args, precision=6, zerotrim=True, **kwargs)[source]

Return a FuncFormatter instance that replicates the zerotrim feature from AutoFormatter. This is more suitable for arbitrary number formatting not necessarily associated with any Axis instance, e.g. labeling contours.

  • precision (int, optional) – The maximum number of digits after the decimal point.

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