@@ -41,45 +41,6 @@ def tearDown( self ):
4141 """Clean-up any generated files here."""
4242 pass
4343
44- #--------------------------------------------------------------------
45- def testPolarAnnotations ( self ):
46- """Polar Plot Annotations"""
47-
48- # you can specify the xypoint and the xytext in different
49- # positions and coordinate systems, and optionally turn on a
50- # connecting line and mark the point with a marker. Annotations
51- # work on polar axes too. In the example below, the xy point is
52- # in native coordinates (xycoords defaults to 'data'). For a
53- # polar axes, this is in (theta, radius) space. The text in this
54- # example is placed in the fractional figure coordinate system.
55- # Text keyword args like horizontal and vertical alignment are
56- # respected
57-
58- # Setup some data
59- r = npy .arange (0.0 , 1.0 , 0.001 )
60- theta = 2.0 * 2.0 * npy .pi * r
61-
62- fname = self .outFile ( "polar_axes.png" )
63-
64- fig = figure ()
65- ax = fig .add_subplot ( 111 , polar = True )
66- line , = ax .plot ( theta , r , color = '#ee8d18' , lw = 3 )
67-
68- ind = 800
69- thisr , thistheta = r [ind ], theta [ind ]
70- ax .plot ([thistheta ], [thisr ], 'o' )
71- ax .annotate ('a polar annotation' ,
72- xy = (thistheta , thisr ), # theta, radius
73- xytext = (0.05 , 0.05 ), # fraction, fraction
74- textcoords = 'figure fraction' ,
75- arrowprops = dict (facecolor = 'black' , shrink = 0.05 ),
76- horizontalalignment = 'left' ,
77- verticalalignment = 'bottom' ,
78- )
79-
80- fig .savefig ( fname )
81- self .checkImage ( fname )
82-
8344 #--------------------------------------------------------------------
8445 def testPolarCoordAnnotations ( self ):
8546 """Polar Coordinate Annotations"""
0 commit comments