@@ -449,28 +449,16 @@ def _get_gridline(self):
449
449
450
450
def update_position (self , loc ):
451
451
'Set the location of tick in data coords with scalar *loc*'
452
- x = loc
453
-
454
- nonlinear = (hasattr (self .axes , 'yaxis' ) and
455
- self .axes .yaxis .get_scale () != 'linear' or
456
- hasattr (self .axes , 'xaxis' ) and
457
- self .axes .xaxis .get_scale () != 'linear' )
458
-
459
452
if self .tick1On :
460
- self .tick1line .set_xdata ((x ,))
453
+ self .tick1line .set_xdata ((loc ,))
461
454
if self .tick2On :
462
- self .tick2line .set_xdata ((x ,))
455
+ self .tick2line .set_xdata ((loc ,))
463
456
if self .gridOn :
464
- self .gridline .set_xdata ((x ,))
457
+ self .gridline .set_xdata ((loc ,))
465
458
if self .label1On :
466
- self .label1 .set_x (x )
459
+ self .label1 .set_x (loc )
467
460
if self .label2On :
468
- self .label2 .set_x (x )
469
-
470
- if nonlinear :
471
- self .tick1line ._invalid = True
472
- self .tick2line ._invalid = True
473
- self .gridline ._invalid = True
461
+ self .label2 .set_x (loc )
474
462
475
463
self ._loc = loc
476
464
self .stale = True
@@ -583,28 +571,17 @@ def _get_gridline(self):
583
571
return l
584
572
585
573
def update_position (self , loc ):
586
- 'Set the location of tick in data coords with scalar loc'
587
- y = loc
588
-
589
- nonlinear = (hasattr (self .axes , 'yaxis' ) and
590
- self .axes .yaxis .get_scale () != 'linear' or
591
- hasattr (self .axes , 'xaxis' ) and
592
- self .axes .xaxis .get_scale () != 'linear' )
593
-
574
+ 'Set the location of tick in data coords with scalar *loc*'
594
575
if self .tick1On :
595
- self .tick1line .set_ydata ((y ,))
576
+ self .tick1line .set_ydata ((loc ,))
596
577
if self .tick2On :
597
- self .tick2line .set_ydata ((y ,))
578
+ self .tick2line .set_ydata ((loc ,))
598
579
if self .gridOn :
599
- self .gridline .set_ydata ((y , ))
580
+ self .gridline .set_ydata ((loc , ))
600
581
if self .label1On :
601
- self .label1 .set_y (y )
582
+ self .label1 .set_y (loc )
602
583
if self .label2On :
603
- self .label2 .set_y (y )
604
- if nonlinear :
605
- self .tick1line ._invalid = True
606
- self .tick2line ._invalid = True
607
- self .gridline ._invalid = True
584
+ self .label2 .set_y (loc )
608
585
609
586
self ._loc = loc
610
587
self .stale = True
0 commit comments