@@ -15,6 +15,9 @@ def test_formatter_ticker():
15
15
import matplotlib .testing .jpl_units as units
16
16
units .register ()
17
17
18
+ # This should affect the tick size. (Tests issue #543)
19
+ matplotlib .rcParams ['lines.markeredgewidth' ] = 30
20
+
18
21
# This essentially test to see if user specified labels get overwritten
19
22
# by the auto labeler functionality of the axes.
20
23
xdata = [ x * units .sec for x in range (10 ) ]
@@ -319,7 +322,7 @@ def test_polar_theta_position():
319
322
ax .plot (theta , r )
320
323
ax .set_theta_zero_location ("NW" )
321
324
ax .set_theta_direction ('clockwise' )
322
-
325
+
323
326
@image_comparison (baseline_images = ['axvspan_epoch' ])
324
327
def test_axvspan_epoch ():
325
328
from datetime import datetime
@@ -508,7 +511,7 @@ def test_symlog2():
508
511
ax .set_xscale ('symlog' , linthreshx = 0.01 )
509
512
ax .grid (True )
510
513
ax .set_ylim (- 0.1 , 0.1 )
511
-
514
+
512
515
@image_comparison (baseline_images = ['pcolormesh' ], tol = 0.02 )
513
516
def test_pcolormesh ():
514
517
n = 12
@@ -542,7 +545,7 @@ def test_pcolormesh():
542
545
ax .set_title ('gouraud' )
543
546
ax .set_xticks ([])
544
547
ax .set_yticks ([])
545
-
548
+
546
549
547
550
@image_comparison (baseline_images = ['canonical' ])
548
551
def test_canonical ():
@@ -625,7 +628,21 @@ def test_markevery_line():
625
628
ax .plot (x , y , '-+' , markevery = (5 , 20 ), label = 'mark every 5 starting at 10' )
626
629
ax .legend ()
627
630
628
-
631
+ def test_annotation_failure ():
632
+ """See issue #566"""
633
+ import cStringIO
634
+ plt .plot ([1 , 2 , 3 , 4 ], [0 , - 1 , - 2 , 8 ])
635
+ plt .annotate ("Blah" , xy = (2 , 2 ), xytext = (- 20 ,- 20 ),
636
+ textcoords = 'offset points' ,
637
+ bbox = dict (boxstyle = 'round,pad=0.5' ),
638
+ arrowprops = dict (arrowstyle = 'fancy' ,
639
+ connectionstyle = 'arc3,rad=0' ))
640
+
641
+ plt .savefig (cStringIO .StringIO ())
642
+
643
+
629
644
if __name__ == '__main__' :
630
645
import nose
631
646
nose .runmodule (argv = ['-s' ,'--with-doctest' ], exit = False )
647
+
648
+
0 commit comments