def __call__(self, x, pos=None):
b = self._base<EOL>if x == <NUM_LIT:0>:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>sign = np.sign(x)<EOL>fx = math.log(abs(x))/math.log(b)<EOL>isDecade = self.is_decade(fx)<EOL>usetex = rcParams['<STR_LIT>']<EOL>if sign == -<NUM_LIT:1>:<EOL><INDENT>sign_string = '<STR_LIT:->'<EOL><DEDENT>else:<EOL><INDENT>sign_string = '<STR_LIT>'<EOL><DEDENT>if not isDecade and self.labelOnlyBase: s = '<STR_LIT>'<EOL>elif not isDecade:<EOL><INDENT>if usetex:<EOL><INDENT>s = r'<STR_LIT>'% (sign_string, b, fx)<EOL><DEDENT>else:<EOL><INDENT>s = '<STR_LIT>'% (sign_string, b, fx)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if usetex:<EOL><INDENT>s = r'<STR_LIT>'% (sign_string, b, self.nearest_long(fx))<EOL><DEDENT>else:<EOL><INDENT>s = r'<STR_LIT>'% (sign_string, b, self.nearest_long(fx))<EOL><DEDENT><DEDENT>return s<EOL>
Return the format for tick val *x* at position *pos*