14 lines
325 B
Python
14 lines
325 B
Python
from mpl_toolkits.axisartist.grid_finder import (
|
|
FormatterPrettyPrint,
|
|
MaxNLocator)
|
|
|
|
|
|
def test_pretty_print_format():
|
|
locator = MaxNLocator()
|
|
locs, nloc, factor = locator(0, 100)
|
|
|
|
fmt = FormatterPrettyPrint()
|
|
|
|
assert fmt("left", None, locs) == \
|
|
[r'$\mathdefault{%d}$' % (l, ) for l in locs]
|