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)
I would like a custom formatter that does 3 things:
1) Blanks out all the values less than 0.
2) Chooses appropriate major ticks when zoomed out.
3) Shows an integer when the zoom scale is revealing multiple
integers, but shows a decimal number when it is just showing within
one integer; i.e. if i