1+ from __future__ import print_function
2+
13import matplotlib .pyplot as plt
24from matplotlib .testing .decorators import image_comparison
35import matplotlib
46
7+
58def draw_arrow (ax , t , r ):
6- ax .annotate ('' , xy = (0.5 , 0.5 + r ), xytext = (0.5 , 0.5 ), size = 30 ,
9+ ax .annotate ('' , xy = (0.5 , 0.5 + r ), xytext = (0.5 , 0.5 ), size = 30 ,
710 arrowprops = dict (arrowstyle = t ,
811 fc = "b" , ec = 'k' ))
912
13+
1014@image_comparison (baseline_images = ['fancyarrow_test_image' ])
1115def test_fancyarrow ():
1216 r = [0.4 , 0.3 , 0.2 , 0.1 ]
1317 t = ["fancy" , "simple" , matplotlib .patches .ArrowStyle .Fancy ()]
1418
1519 fig , axes = plt .subplots (len (t ), len (r ), squeeze = False ,
1620 subplot_kw = dict (aspect = True ),
17- figsize = (8 , 4.5 ))
21+ figsize = (8 , 4.5 ))
1822
1923 for i_r , r1 in enumerate (r ):
2024 for i_t , t1 in enumerate (t ):
@@ -23,7 +27,6 @@ def test_fancyarrow():
2327 ax .tick_params (labelleft = False , labelbottom = False )
2428
2529
26- if __name__ == '__main__' :
30+ if __name__ == '__main__' :
2731 import nose
28- nose .runmodule (argv = ['-s' ,'--with-doctest' ], exit = False )
29-
32+ nose .runmodule (argv = ['-s' , '--with-doctest' ], exit = False )
0 commit comments