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

Skip to content

Commit 4819d22

Browse files
committed
test conversion: move old-style test to new-style test
svn path=/trunk/matplotlib/; revision=7693
1 parent 597da3a commit 4819d22

3 files changed

Lines changed: 24 additions & 67 deletions

File tree

test/test_plots/baseline/TestPolar/polar_units.png renamed to lib/matplotlib/tests/baseline_images/test_axes/polar_units.png

File renamed without changes.

lib/matplotlib/tests/test_axes.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,3 +288,27 @@ def test_polar_wrap():
288288
pylab.rgrids( [0.05, 0.1, 0.15, 0.2, 0.25, 0.3] )
289289

290290
fig.savefig( 'polar_wrap_360' )
291+
292+
@image_comparison(baseline_images=['polar_units'])
293+
def test_polar_units():
294+
"""Test polar plots with unitized data."""
295+
import matplotlib.testing.jpl_units as units
296+
units.register()
297+
298+
pi = np.pi
299+
deg = units.UnitDbl( 1.0, "deg" )
300+
301+
x1 = [ pi/6.0, pi/4.0, pi/3.0, pi/2.0 ]
302+
x2 = [ 30.0*deg, 45.0*deg, 60.0*deg, 90.0*deg ]
303+
304+
y1 = [ 1.0, 2.0, 3.0, 4.0]
305+
y2 = [ 4.0, 3.0, 2.0, 1.0 ]
306+
307+
fig = pylab.figure()
308+
309+
pylab.polar( x2, y1, color = "blue" )
310+
311+
# polar( x2, y1, color = "red", xunits="rad" )
312+
# polar( x2, y2, color = "green" )
313+
314+
fig.savefig( 'polar_units' )

test/test_plots/TestPolar.py

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)