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

Skip to content

Commit 49d2cf1

Browse files
committed
Add test for log transform.
1 parent 9dcc1fa commit 49d2cf1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/matplotlib/tests/test_transforms.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,15 @@ def test_bbox_as_strings():
487487
assert_equal(eval(format(getattr(b, k), fmt)), v)
488488

489489

490+
@cleanup
491+
def test_log_transform():
492+
# Tests that the last line runs without exception (previously the
493+
# transform would fail if one of the axes was logarithmic).
494+
fig, ax = plt.subplots()
495+
ax.set_yscale('log')
496+
ax.transData.transform((1,1))
497+
498+
490499
if __name__=='__main__':
491500
import nose
492501
nose.runmodule(argv=['-s','--with-doctest'], exit=False)

0 commit comments

Comments
 (0)