Skip to content

Fix log transforms (fixes #3809) [back port to 1.4.x] #3863

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 7 commits into from
Dec 9, 2014
Merged
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
Add test for log transform.
  • Loading branch information
maxalbert committed Dec 4, 2014
commit 49d2cf110e80f43ce3bb4c9d46fce6761f0b0216
9 changes: 9 additions & 0 deletions lib/matplotlib/tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,15 @@ def test_bbox_as_strings():
assert_equal(eval(format(getattr(b, k), fmt)), v)


@cleanup
def test_log_transform():
# Tests that the last line runs without exception (previously the
# transform would fail if one of the axes was logarithmic).
fig, ax = plt.subplots()
ax.set_yscale('log')
ax.transData.transform((1,1))


if __name__=='__main__':
import nose
nose.runmodule(argv=['-s','--with-doctest'], exit=False)