@@ -1007,19 +1007,35 @@ def test_mollweide_inverse_forward_closure():
1007
1007
np .testing .assert_array_almost_equal (xy , xy2 , 3 )
1008
1008
1009
1009
1010
- @image_comparison (baseline_images = ['translucent_markers ' ], remove_text = True )
1011
- def test_translucent_markers ():
1010
+ @image_comparison (baseline_images = ['test_alpha ' ], remove_text = True )
1011
+ def test_alpha ():
1012
1012
np .random .seed (0 )
1013
1013
data = np .random .random (50 )
1014
1014
1015
1015
fig = plt .figure ()
1016
1016
ax = fig .add_subplot (111 )
1017
- ax .plot (data , 'D' , mfc = [1 , 0 , 0 , .5 ], markersize = 100 )
1018
1017
1019
-
1020
- if __name__ == '__main__' :
1021
- import nose
1022
- nose .runmodule (argv = ['-s' ,'--with-doctest' ], exit = False )
1018
+ # alpha=.5 markers, solid line
1019
+ ax .plot (data , '-D' , color = [1 , 0 , 0 ], mfc = [1 , 0 , 0 , .5 ],
1020
+ markersize = 20 , lw = 10 )
1021
+
1022
+ # everything solid by kwarg
1023
+ ax .plot (data + 2 , '-D' , color = [1 , 0 , 0 , .5 ], mfc = [1 , 0 , 0 , .5 ],
1024
+ markersize = 20 , lw = 10 ,
1025
+ alpha = 1 )
1026
+
1027
+ # everything alpha=.5 by kwarg
1028
+ ax .plot (data + 4 , '-D' , color = [1 , 0 , 0 ], mfc = [1 , 0 , 0 ],
1029
+ markersize = 20 , lw = 10 ,
1030
+ alpha = .5 )
1031
+
1032
+ # everything alpha=.5 by colors
1033
+ ax .plot (data + 6 , '-D' , color = [1 , 0 , 0 , .5 ], mfc = [1 , 0 , 0 , .5 ],
1034
+ markersize = 20 , lw = 10 )
1035
+
1036
+ # alpha=.5 line, solid markers
1037
+ ax .plot (data + 8 , '-D' , color = [1 , 0 , 0 , .5 ], mfc = [1 , 0 , 0 ],
1038
+ markersize = 20 , lw = 10 )
1023
1039
1024
1040
1025
1041
@image_comparison (baseline_images = ['vline_hline_zorder' ,
@@ -1050,3 +1066,7 @@ def test_eb_line_zorder():
1050
1066
ax .axhline (- j , lw = 5 , color = 'k' , zorder = j )
1051
1067
1052
1068
ax .set_title ("errorbar zorder test" )
1069
+
1070
+ if __name__ == '__main__' :
1071
+ import nose
1072
+ nose .runmodule (argv = ['-s' ,'--with-doctest' ], exit = False )
0 commit comments