@@ -664,7 +664,6 @@ def __init__(self, axes, pickradius=15):
664
664
# Initialize here for testing; later add API
665
665
self ._major_tick_kw = dict ()
666
666
self ._minor_tick_kw = dict ()
667
- self ._tick_space = None
668
667
669
668
self .cla ()
670
669
self ._set_scale ('linear' )
@@ -796,7 +795,6 @@ def set_tick_params(self, which='major', reset=False, **kw):
796
795
for tick in self .minorTicks :
797
796
tick ._apply_params (** self ._minor_tick_kw )
798
797
self .stale = True
799
- self ._tick_space = None
800
798
801
799
@staticmethod
802
800
def _translate_tick_kw (kw , to_init_kw = True ):
@@ -2018,16 +2016,14 @@ def set_default_intervals(self):
2018
2016
self .stale = True
2019
2017
2020
2018
def get_tick_space (self ):
2021
- if self ._tick_space is None :
2022
- ends = self .axes .transAxes .transform ([[0 , 0 ], [1 , 0 ]])
2023
- length = ((ends [1 ][0 ] - ends [0 ][0 ]) / self .axes .figure .dpi ) * 72.0
2024
- tick = self ._get_tick (True )
2025
- # There is a heuristic here that the aspect ratio of tick text
2026
- # is no more than 3:1
2027
- size = tick .label1 .get_size () * 3
2028
- size *= np .cos (np .deg2rad (tick .label1 .get_rotation ()))
2029
- return np .floor (length / size )
2030
- return self ._tick_space
2019
+ ends = self .axes .transAxes .transform ([[0 , 0 ], [1 , 0 ]])
2020
+ length = ((ends [1 ][0 ] - ends [0 ][0 ]) / self .axes .figure .dpi ) * 72.0
2021
+ tick = self ._get_tick (True )
2022
+ # There is a heuristic here that the aspect ratio of tick text
2023
+ # is no more than 3:1
2024
+ size = tick .label1 .get_size () * 3
2025
+ size *= np .cos (np .deg2rad (tick .label1 .get_rotation ()))
2026
+ return np .floor (length / size )
2031
2027
2032
2028
2033
2029
class YAxis (Axis ):
@@ -2361,12 +2357,10 @@ def set_default_intervals(self):
2361
2357
self .stale = True
2362
2358
2363
2359
def get_tick_space (self ):
2364
- if self ._tick_space is None :
2365
- ends = self .axes .transAxes .transform ([[0 , 0 ], [0 , 1 ]])
2366
- length = ((ends [1 ][1 ] - ends [0 ][1 ]) / self .axes .figure .dpi ) * 72.0
2367
- tick = self ._get_tick (True )
2368
- # Having a spacing of at least 2 just looks good.
2369
- size = tick .label1 .get_size () * 2.0
2370
- size *= np .cos (np .deg2rad (tick .label1 .get_rotation ()))
2371
- return np .floor (length / size )
2372
- return self ._tick_space
2360
+ ends = self .axes .transAxes .transform ([[0 , 0 ], [0 , 1 ]])
2361
+ length = ((ends [1 ][1 ] - ends [0 ][1 ]) / self .axes .figure .dpi ) * 72.0
2362
+ tick = self ._get_tick (True )
2363
+ # Having a spacing of at least 2 just looks good.
2364
+ size = tick .label1 .get_size () * 2.0
2365
+ size *= np .cos (np .deg2rad (tick .label1 .get_rotation ()))
2366
+ return np .floor (length / size )
0 commit comments