66from matplotlib .transforms import bound2d_all
77from matplotlib .transforms import transform_bound1d
88from matplotlib .transforms import TransformSize , Points , Dots , \
9- Centimeter , Inches , RefVal
9+ Centimeter , Inches , RWRef
1010from matplotlib .artist import DPI
1111
1212def closeto (x ,y ):
@@ -105,7 +105,7 @@ def closeto(x,y):
105105dots = Dots (dpi )
106106pts = Points (dpi )
107107
108- trans = TransformSize (pts , dots , RefVal (10 ))
108+ trans = TransformSize (pts , dots , RWRef (10 ))
109109closeto (trans .positions (0 ), 10 )
110110closeto (trans .positions (72 ), 110 )
111111
@@ -117,7 +117,7 @@ def closeto(x,y):
117117cm = Centimeter (dpi )
118118inch = Inches (dpi )
119119
120- trans = TransformSize (cm , inch , RefVal (0 ))
120+ trans = TransformSize (cm , inch , RWRef (0 ))
121121closeto (trans .positions (2 ), 2 / 2.54 )
122122closeto (trans .inverse_positions (trans .positions (2 )), 2 )
123123#closeto(trans.positions(36), 110)
@@ -126,10 +126,10 @@ def closeto(x,y):
126126pts = Points (dpi )
127127dots = Dots (dpi )
128128
129- trans = TransformSize (pts , dots , RefVal (62.5 ))
129+ trans = TransformSize (pts , dots , RWRef (62.5 ))
130130closeto ( 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
135135print 'passed size transform tests ... '
0 commit comments