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

Skip to content

Commit b175561

Browse files
author
James Evans
committed
Fixed previous set_ticklabel modification.
svn path=/trunk/matplotlib/; revision=3244
1 parent ee89b6f commit b175561

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/matplotlib/axis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,10 @@ def set_ticklabels(self, ticklabels, *args, **kwargs):
917917

918918
ret = []
919919
for i, tick in enumerate(self.get_major_ticks()):
920-
if i<len(ticklabels): ret.append(tick.label1)
920+
if i<len(ticklabels):
921+
tick.label1.set_text(ticklabels[i])
922+
ret.append(tick.label1)
921923
tick.label1.update(kwargs)
922-
if ( ticklabels ):
923-
tick.label1.set_text(ticklabels[i])
924924
return ret
925925

926926
def set_ticks(self, ticks):

0 commit comments

Comments
 (0)