Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Axisartist testing + bugfixes #7545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make axisartist.grid_finder pseudo-tests real.
  • Loading branch information
QuLogic committed Feb 6, 2018
commit 9488d1c82da00c04f6f4c5e2805175370c966fd7
9 changes: 0 additions & 9 deletions 9 lib/mpl_toolkits/axisartist/grid_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,3 @@ def __call__(self, direction, factor, values):
r = [self._format_dict.get(k, v) for k, v in zip(values,
fallback_strings)]
return r


if __name__ == "__main__":
locator = MaxNLocator()
locs, nloc, factor = locator(0, 100)

fmt = FormatterPrettyPrint()

print(fmt("left", None, locs))
16 changes: 16 additions & 0 deletions 16 lib/mpl_toolkits/tests/test_axisartist_grid_finder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)

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]
Morty Proxy This is a proxified and sanitized view of the page, visit original site.