'Draw the math text using matplotlib.mathtext'

def draw_mathtext(self, gc, x, y, s, prop, angle):

    if debugPS:
        self._pswriter.write(u'%    mathtext\n')
    (width, height, descent, pswriter, used_characters) = self.mathtext_parser.parse(s, 72, prop)
    self.merge_used_characters(used_characters)
    self.set_color(*gc.get_rgb())
    thetext = pswriter.getvalue()
    ps = (u'gsave\n%(x)f    %(y)f    translate\n%(angle)f    rotate\n%(thetext)s\ngrestore\n' % locals())
    self._pswriter.write(ps)
