File tree 2 files changed +12
-1
lines changed 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ def _apply_params(self, **kw):
342
342
# -> points. grab the integer from the `Text` object
343
343
# instead of saving the string representation
344
344
v = getattr (self .label1 , 'get_' + k )()
345
- setattr (self , '_ ' + k , v )
345
+ setattr (self , '_label ' + k , v )
346
346
347
347
348
348
class XTick (Tick ):
Original file line number Diff line number Diff line change @@ -4335,6 +4335,17 @@ 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_labelsize_labelcolor ():
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'
4338
4349
4339
4350
if __name__ == '__main__' :
4340
4351
import nose
You can’t perform that action at this time.
0 commit comments