Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bad39f1

Browse files
committed
PEP8 fixes for LogFormatterExponent
1 parent 03af950 commit bad39f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/tests/test_ticker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def test_LogLocator():
5050
test_value = np.array([0.5, 1., 2., 4., 8., 16., 32., 64., 128., 256.])
5151
assert_almost_equal(loc.tick_values(1, 100), test_value)
5252

53+
5354
def test_LogFormatterExponent():
5455
class FakeAxis(object):
5556
"""Allow Formatter to be called without having a "full" plot set up."""
@@ -75,12 +76,13 @@ def get_view_interval(self):
7576
i = range(len(locs))
7677
expected_result = ['0.1', '1e-05', '3.14', '0.2', '-0.2', '-1e-05']
7778
for base in [2, 5, 10, np.pi, np.e]:
78-
formatter = mticker.LogFormatterExponent(base=base, labelOnlyBase=False)
79+
formatter = mticker.LogFormatterExponent(base, labelOnlyBase=False)
7980
formatter.axis = FakeAxis()
8081
vals = base**locs
8182
labels = [formatter(x, pos) for (x, pos) in zip(vals, i)]
8283
nose.tools.assert_equal(labels, expected_result)
8384

85+
8486
def test_use_offset():
8587
for use_offset in [True, False]:
8688
with matplotlib.rc_context({'axes.formatter.useoffset': use_offset}):

0 commit comments

Comments
 (0)