@staticmethod
def format_pi(val):
    fracvals = MatplotlibDrawer.fraction(val)
    buf = ''
    if fracvals:
        (nmr, dnm) = (fracvals.numerator, fracvals.denominator)
        if (nmr == 1):
            buf += '$\\pi$'
        elif (nmr == (- 1)):
            buf += '-$\\pi$'
        else:
            buf += '{}$\\pi$'.format(nmr)
        if (dnm > 1):
            buf += '/{}'.format(dnm)
        return buf
    else:
        coef = MatplotlibDrawer.format_numeric((val / np.pi))
        if (coef == '0'):
            return '0'
        return '{}$\\pi$'.format(coef)
@staticmethod
def format_pi(val):
    fracvals = MatplotlibDrawer.fraction(val)
    buf = 
    if fracvals:
        (nmr, dnm) = (fracvals.numerator, fracvals.denominator)
        if (nmr == 1):
            buf += '$\\pi$'
        elif (nmr == (- 1)):
            buf += '-$\\pi$'
        else:
            buf += '{}$\\pi$'.format(nmr)
        if (dnm > 1):
            buf += '/{}'.format(dnm)
        return buf
    else:
        coef = MatplotlibDrawer.format_numeric((val / np.pi))
        if (coef == '0'):
            return '0'
        return '{}$\\pi$'.format(coef)