SimpleFormatter

SimpleFormatter(precision=6, zerotrim=True)[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.

Parameters
  • 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.