@@ -1937,12 +1937,30 @@ def set_ticks_position(self, position):
19371937 self .stale = True
19381938
19391939 def tick_top (self ):
1940- 'use ticks only on top'
1940+ """
1941+ Move ticks and ticklabels (if present) to the top of the axes.
1942+ """
1943+ label = True
1944+ if 'label1On' in self ._major_tick_kw :
1945+ label = (self ._major_tick_kw ['label1On' ]
1946+ or self ._major_tick_kw ['label2On' ])
19411947 self .set_ticks_position ('top' )
1948+ # if labels were turned off before this was called
1949+ # leave them off
1950+ self .set_tick_params (which = 'both' , labeltop = label )
19421951
19431952 def tick_bottom (self ):
1944- 'use ticks only on bottom'
1953+ """
1954+ Move ticks and ticklabels (if present) to the bottom of the axes.
1955+ """
1956+ label = True
1957+ if 'label1On' in self ._major_tick_kw :
1958+ label = (self ._major_tick_kw ['label1On' ]
1959+ or self ._major_tick_kw ['label2On' ])
19451960 self .set_ticks_position ('bottom' )
1961+ # if labels were turned off before this was called
1962+ # leave them off
1963+ self .set_tick_params (which = 'both' , labelbottom = label )
19461964
19471965 def get_ticks_position (self ):
19481966 """
@@ -2273,12 +2291,30 @@ def set_ticks_position(self, position):
22732291 self .stale = True
22742292
22752293 def tick_right (self ):
2276- 'use ticks only on right'
2294+ """
2295+ Move ticks and ticklabels (if present) to the right of the axes.
2296+ """
2297+ label = True
2298+ if 'label1On' in self ._major_tick_kw :
2299+ label = (self ._major_tick_kw ['label1On' ]
2300+ or self ._major_tick_kw ['label2On' ])
22772301 self .set_ticks_position ('right' )
2302+ # if labels were turned off before this was called
2303+ # leave them off
2304+ self .set_tick_params (which = 'both' , labelright = label )
22782305
22792306 def tick_left (self ):
2280- 'use ticks only on left'
2307+ """
2308+ Move ticks and ticklabels (if present) to the left of the axes.
2309+ """
2310+ label = True
2311+ if 'label1On' in self ._major_tick_kw :
2312+ label = (self ._major_tick_kw ['label1On' ]
2313+ or self ._major_tick_kw ['label2On' ])
22812314 self .set_ticks_position ('left' )
2315+ # if labels were turned off before this was called
2316+ # leave them off
2317+ self .set_tick_params (which = 'both' , labelleft = label )
22822318
22832319 def get_ticks_position (self ):
22842320 """
0 commit comments