Permalink
Browse files

use ax.transProjection instead of ax.transData in Mollweide axes unit…

… test

The goal was to exercise the MollweideAxes.MollweideTransform and MollweideAxes.InvertedMollweideTransform classes. The ax.transData property does not make use of either of these classes; the ax.transProjection property does.
  • Loading branch information...
1 parent 40a9d48 commit 2ba7aefa36fadbac2d151d0f9add80d9726b335d @lpsinger lpsinger committed Dec 30, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/matplotlib/tests/test_axes.py
@@ -947,10 +947,10 @@ def test_mollweide_forward_inverse_closure():
ll = np.vstack((lon.flatten(), lat.flatten())).T
# perform forward transform
- xy = ax.transAxes.transform(ll)
+ xy = ax.transProjection.transform(ll)
# perform inverse transform
- ll2 = ax.transAxes.inverted().transform(xy)
+ ll2 = ax.transProjection.inverted().transform(xy)
# compare
np.testing.assert_array_almost_equal(ll, ll2)
@@ -968,10 +968,10 @@ def test_mollweide_inverse_forward_closure():
xy = np.vstack((x.flatten(), y.flatten())).T
# perform inverse transform
- ll = ax.transAxes.inverted().transform(xy)
+ ll = ax.transProjection.inverted().transform(xy)
# perform forward transform
- xy2 = ax.transAxes.transform(ll)
+ xy2 = ax.transProjection.transform(ll)
# compare
np.testing.assert_array_almost_equal(xy, xy2)

0 comments on commit 2ba7aef

Please sign in to comment.