On Sat, Feb 13, 2010 at 3:00 PM, Jae-Joon Lee wrote:
> If you're happy with the default formatter behavior (which seems to
> match with your #3 requirement), just reuse it.
>
> class MyFormatter(ScalarFormatter):
> def __call__(self, val, pos=None):
> if val < 0:
> return ''
>
If you're happy with the default formatter behavior (which seems to
match with your #3 requirement), just reuse it.
class MyFormatter(ScalarFormatter):
def __call__(self, val, pos=None):
if val < 0:
return ''
else:
return ScalarFormatter.__call__(self, val)