@@ -116,22 +116,22 @@ def test_twinx_cla():
116
116
ax2 = ax .twinx ()
117
117
ax3 = ax2 .twiny ()
118
118
plt .draw ()
119
- assert_false (ax2 .xaxis .get_visible () )
120
- assert_false (ax2 .patch .get_visible () )
119
+ assert_false (ax2 .xaxis .visible )
120
+ assert_false (ax2 .patch .visible )
121
121
ax2 .cla ()
122
122
ax3 .cla ()
123
123
124
- assert_false (ax2 .xaxis .get_visible () )
125
- assert_false (ax2 .patch .get_visible () )
126
- assert_true (ax2 .yaxis .get_visible () )
124
+ assert_false (ax2 .xaxis .visible )
125
+ assert_false (ax2 .patch .visible )
126
+ assert_true (ax2 .yaxis .visible )
127
127
128
- assert_true (ax3 .xaxis .get_visible () )
129
- assert_false (ax3 .patch .get_visible () )
130
- assert_false (ax3 .yaxis .get_visible () )
128
+ assert_true (ax3 .xaxis .visible )
129
+ assert_false (ax3 .patch .visible )
130
+ assert_false (ax3 .yaxis .visible )
131
131
132
- assert_true (ax .xaxis .get_visible () )
133
- assert_true (ax .patch .get_visible () )
134
- assert_true (ax .yaxis .get_visible () )
132
+ assert_true (ax .xaxis .visible )
133
+ assert_true (ax .patch .visible )
134
+ assert_true (ax .yaxis .visible )
135
135
136
136
137
137
@image_comparison (baseline_images = ["minorticks_on_rcParams_both" ], extensions = ['png' ])
@@ -219,7 +219,7 @@ def test_polar_coord_annotations():
219
219
ax = fig .add_subplot (111 , aspect = 'equal' )
220
220
221
221
ax .add_artist (el )
222
- el .set_clip_box ( ax .bbox )
222
+ el .clipbox = ax .bbox
223
223
224
224
ax .annotate ('the top' ,
225
225
xy = (np .pi / 2. , 10. ), # theta, radius
@@ -229,7 +229,7 @@ def test_polar_coord_annotations():
229
229
arrowprops = dict (facecolor = 'black' , shrink = 0.05 ),
230
230
horizontalalignment = 'left' ,
231
231
verticalalignment = 'baseline' ,
232
- clip_on = True , # clip to the axes bounding box
232
+ clipon = True , # clip to the axes bounding box
233
233
)
234
234
235
235
ax .set_xlim (- 20 , 20 )
@@ -518,7 +518,7 @@ def test_hexbin_extent():
518
518
519
519
520
520
@image_comparison (baseline_images = ['hexbin_empty' ], remove_text = True ,
521
- extensions = ['png' ])
521
+ extensions = ['png' ])
522
522
def test_hexbin_empty ():
523
523
# From #3886: creating hexbin from empty dataset raises ValueError
524
524
ax = plt .gca ()
@@ -638,7 +638,7 @@ def test_imshow_clip():
638
638
c = ax .contour (r , [N / 4 ])
639
639
x = c .collections [0 ]
640
640
clipPath = x .get_paths ()[0 ]
641
- clipTransform = x .get_transform ()
641
+ clipTransform = x .transform
642
642
643
643
from matplotlib .transforms import TransformedPath
644
644
clip_path = TransformedPath (clipPath , clipTransform )
@@ -1083,14 +1083,14 @@ def test_hist_log():
1083
1083
ax .hist (data , fill = False , log = True )
1084
1084
1085
1085
@image_comparison (baseline_images = ['hist_bar_empty' ], remove_text = True ,
1086
- extensions = ['png' ])
1086
+ extensions = ['png' ])
1087
1087
def test_hist_bar_empty ():
1088
1088
# From #3886: creating hist from empty dataset raises ValueError
1089
1089
ax = plt .gca ()
1090
1090
ax .hist ([], histtype = 'bar' )
1091
1091
1092
1092
@image_comparison (baseline_images = ['hist_step_empty' ], remove_text = True ,
1093
- extensions = ['png' ])
1093
+ extensions = ['png' ])
1094
1094
def test_hist_step_empty ():
1095
1095
# From #3886: creating hist from empty dataset raises ValueError
1096
1096
ax = plt .gca ()
@@ -3581,9 +3581,9 @@ def test_twin_spines():
3581
3581
3582
3582
def make_patch_spines_invisible (ax ):
3583
3583
ax .set_frame_on (True )
3584
- ax .patch .set_visible ( False )
3584
+ ax .patch .visible = False
3585
3585
for sp in six .itervalues (ax .spines ):
3586
- sp .set_visible ( False )
3586
+ sp .visible = False
3587
3587
3588
3588
fig = plt .figure (figsize = (4 , 3 ))
3589
3589
fig .subplots_adjust (right = 0.75 )
@@ -3600,7 +3600,7 @@ def make_patch_spines_invisible(ax):
3600
3600
# and spines invisible.
3601
3601
make_patch_spines_invisible (par2 )
3602
3602
# Second, show the right spine.
3603
- par2 .spines ["right" ].set_visible ( True )
3603
+ par2 .spines ["right" ].visible = True
3604
3604
3605
3605
p1 , = host .plot ([0 , 1 , 2 ], [0 , 1 , 2 ], "b-" )
3606
3606
p2 , = par1 .plot ([0 , 1 , 2 ], [0 , 3 , 2 ], "r-" )
@@ -3643,14 +3643,14 @@ def test_twin_spines_on_top():
3643
3643
ax2 .fill_between (data [0 ], data [1 ]/ 1E3 , color = '#7FC97F' , alpha = .5 )
3644
3644
3645
3645
# Reuse testcase from above for a labeled data test
3646
- data = {"x " : data [0 ], "y " : data [1 ]/ 1E3 }
3646
+ data = {"i " : data [0 ], "j " : data [1 ]/ 1E3 }
3647
3647
fig = plt .figure ()
3648
3648
ax1 = fig .add_subplot (1 , 1 , 1 )
3649
3649
ax2 = ax1 .twinx ()
3650
- ax1 .plot ("x " , "y " , color = '#BEAED4' , data = data )
3651
- ax1 .fill_between ("x " , "y " , color = '#BEAED4' , alpha = .8 , data = data )
3652
- ax2 .plot ("x " , "y " , color = '#7FC97F' , data = data )
3653
- ax2 .fill_between ("x " , "y " , color = '#7FC97F' , alpha = .5 , data = data )
3650
+ ax1 .plot ("i " , "j " , color = '#BEAED4' , data = data )
3651
+ ax1 .fill_between ("i " , "j " , color = '#BEAED4' , alpha = .8 , data = data )
3652
+ ax2 .plot ("i " , "j " , color = '#7FC97F' , data = data )
3653
+ ax2 .fill_between ("i " , "j " , color = '#7FC97F' , alpha = .5 , data = data )
3654
3654
3655
3655
3656
3656
@cleanup
@@ -3715,7 +3715,7 @@ def test_relim_visible_only():
3715
3715
l = ax .plot (x2 , y2 )
3716
3716
assert ax .get_xlim () == x2
3717
3717
assert ax .get_ylim () == y2
3718
- l [0 ].set_visible ( False )
3718
+ l [0 ].visible = False
3719
3719
assert ax .get_xlim () == x2
3720
3720
assert ax .get_ylim () == y2
3721
3721
0 commit comments