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

Skip to content

Commit 28e6ab4

Browse files
committed
updated transform unit tests
svn path=/trunk/matplotlib/; revision=72
1 parent eb00e6b commit 28e6ab4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

unit/transforms_unit.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from matplotlib.transforms import bound2d_all
77
from matplotlib.transforms import transform_bound1d
88
from matplotlib.transforms import TransformSize, Points, Dots, \
9-
Centimeter, Inches, RefVal
9+
Centimeter, Inches, RWRef
1010
from matplotlib.artist import DPI
1111

1212
def closeto(x,y):
@@ -105,7 +105,7 @@ def closeto(x,y):
105105
dots = Dots(dpi)
106106
pts = Points(dpi)
107107

108-
trans = TransformSize(pts, dots, RefVal(10))
108+
trans = TransformSize(pts, dots, RWRef(10))
109109
closeto(trans.positions(0), 10)
110110
closeto(trans.positions(72), 110)
111111

@@ -117,7 +117,7 @@ def closeto(x,y):
117117
cm = Centimeter(dpi)
118118
inch = Inches(dpi)
119119

120-
trans = TransformSize(cm, inch, RefVal(0))
120+
trans = TransformSize(cm, inch, RWRef(0))
121121
closeto(trans.positions(2), 2/2.54)
122122
closeto(trans.inverse_positions(trans.positions(2)), 2)
123123
#closeto(trans.positions(36), 110)
@@ -126,10 +126,10 @@ def closeto(x,y):
126126
pts = Points(dpi)
127127
dots = Dots(dpi)
128128

129-
trans = TransformSize(pts, dots, RefVal(62.5))
129+
trans = TransformSize(pts, dots, RWRef(62.5))
130130
closeto( trans.positions(12), 12/72*100 + 62.5)
131131

132-
trans = TransformSize(pts, dots, RefVal(10))
132+
trans = TransformSize(pts, dots, RWRef(10))
133133
#print trans.positions(-12)
134134

135135
print 'passed size transform tests ... '

0 commit comments

Comments
 (0)