File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -4335,6 +4335,25 @@ def test_pandas_indexing_hist():
4335
4335
fig , axes = plt .subplots ()
4336
4336
axes .hist (ser_2 )
4337
4337
4338
+ @cleanup
4339
+ def test_axis_set_tick_params_two_calls ():
4340
+ # Tests fix for issue 4346
4341
+ axis_1 = plt .subplot ()
4342
+ axis_1 .yaxis .set_tick_params (labelsize = 30 , labelcolor = 'red' , direction = 'out' )
4343
+
4344
+ # Expected values after setting the ticks
4345
+ assert axis_1 .yaxis .majorTicks [0 ]._size == 4.0
4346
+ assert axis_1 .yaxis .majorTicks [0 ]._color == 'k'
4347
+ assert axis_1 .yaxis .majorTicks [0 ]._labelsize == 30.0
4348
+ assert axis_1 .yaxis .majorTicks [0 ]._labelcolor == 'red'
4349
+
4350
+ # This second call to set_tick_params should not change any parameters
4351
+ axis_1 .yaxis .set_tick_params ()
4352
+
4353
+ assert axis_1 .yaxis .majorTicks [0 ]._size == 4.0
4354
+ assert axis_1 .yaxis .majorTicks [0 ]._color == 'k'
4355
+ assert axis_1 .yaxis .majorTicks [0 ]._labelsize == 30.0
4356
+ assert axis_1 .yaxis .majorTicks [0 ]._labelcolor == 'red'
4338
4357
4339
4358
if __name__ == '__main__' :
4340
4359
import nose
You can’t perform that action at this time.
0 commit comments