Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3225105

Browse files
committed
Merged revisions 8554 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v1_0_maint ........ r8554 | efiring | 2010-07-15 07:34:42 -1000 (Thu, 15 Jul 2010) | 2 lines yaxis.set_ticks_position: fix bug with 'none'; thanks to Ben North ........ svn path=/trunk/matplotlib/; revision=8555
1 parent 17c5041 commit 3225105

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

lib/matplotlib/axis.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,11 +1886,12 @@ def get_text_widths(self, renderer):
18861886

18871887
def set_ticks_position(self, position):
18881888
"""
1889-
Set the ticks position (left, right, both or default)
1890-
both sets the ticks to appear on both positions, but
1891-
does not change the tick labels.
1892-
default resets the tick positions to the default:
1893-
ticks on both positions, labels on the left.
1889+
Set the ticks position (left, right, both, default or none)
1890+
'both' sets the ticks to appear on both positions, but does not
1891+
change the tick labels. 'default' resets the tick positions to
1892+
the default: ticks on both positions, labels at left. 'none'
1893+
can be used if you don't want any ticks. 'none' and 'both'
1894+
affect only the ticks, not the labels.
18941895
18951896
ACCEPTS: [ 'left' | 'right' | 'both' | 'default' | 'none' ]
18961897
"""
@@ -1904,8 +1905,8 @@ def set_ticks_position(self, position):
19041905
self.set_tick_params(which='both', right=True,
19051906
left=True)
19061907
elif position == 'none':
1907-
self.set_tick_params(which='both', right=False, labelright=False,
1908-
left=False, labelleft=False)
1908+
self.set_tick_params(which='both', right=False,
1909+
left=False)
19091910
elif position == 'default':
19101911
self.set_tick_params(which='both', right=True, labelright=False,
19111912
left=True, labelleft=True)

0 commit comments

Comments
 (0)