# FracFormatter¶

class FracFormatter(symbol='', number=1)[source]

Bases: Formatter

Format numbers as integers or integer fractions. Optionally express the values relative to some constant like numpy.pi.

Parameters

Note

The fractions shown by this formatter are resolved using the builtin fractions.Fraction class and fractions.Fraction.limit_denominator.

Methods Summary

 __call__(x[, pos]) Convert number to a string.