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

Skip to content

Commit 5d59438

Browse files
committed
[ 2107138 ] x/yticklabels return value incorrect
svn path=/trunk/matplotlib/; revision=6141
1 parent 8d7dfcc commit 5d59438

2 files changed

Lines changed: 4 additions & 13 deletions

File tree

lib/matplotlib/axis.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,12 @@ def _get_text1(self):
239239
#t = mtext.Text(
240240
trans, vert, horiz = self.axes.get_xaxis_text1_transform(self._pad)
241241
size = rcParams['xtick.labelsize']
242-
t = mtext.TextWithDash(
242+
t = mtext.Text(
243243
x=0, y=0,
244244
fontproperties=font_manager.FontProperties(size=size),
245245
color=rcParams['xtick.color'],
246246
verticalalignment=vert,
247247
horizontalalignment=horiz,
248-
dashdirection=0,
249-
xaxis=True,
250248
)
251249

252250
t.set_transform(trans)
@@ -261,13 +259,11 @@ def _get_text2(self):
261259
#t = mtext.Text(
262260
trans, vert, horiz = self.axes.get_xaxis_text2_transform(self._pad)
263261

264-
t = mtext.TextWithDash(
262+
t = mtext.Text(
265263
x=0, y=1,
266264
fontproperties=font_manager.FontProperties(size=rcParams['xtick.labelsize']),
267265
color=rcParams['xtick.color'],
268266
verticalalignment=vert,
269-
dashdirection=1,
270-
xaxis=True,
271267
horizontalalignment=horiz,
272268
)
273269
t.set_transform(trans)
@@ -374,14 +370,12 @@ def _get_text1(self):
374370
#t = mtext.Text(
375371
trans, vert, horiz = self.axes.get_yaxis_text1_transform(self._pad)
376372

377-
t = mtext.TextWithDash(
373+
t = mtext.Text(
378374
x=0, y=0,
379375
fontproperties=font_manager.FontProperties(size=rcParams['ytick.labelsize']),
380376
color=rcParams['ytick.color'],
381377
verticalalignment=vert,
382378
horizontalalignment=horiz,
383-
dashdirection=0,
384-
xaxis=False,
385379
)
386380
t.set_transform(trans)
387381
#t.set_transform( self.axes.transData )
@@ -394,13 +388,11 @@ def _get_text2(self):
394388
#t = mtext.Text(
395389
trans, vert, horiz = self.axes.get_yaxis_text2_transform(self._pad)
396390

397-
t = mtext.TextWithDash(
391+
t = mtext.Text(
398392
x=1, y=0,
399393
fontproperties=font_manager.FontProperties(size=rcParams['ytick.labelsize']),
400394
color=rcParams['ytick.color'],
401395
verticalalignment=vert,
402-
dashdirection=1,
403-
xaxis=False,
404396
horizontalalignment=horiz,
405397
)
406398
t.set_transform(trans)

lib/matplotlib/text.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,6 @@ def __init__(self,
846846
dashrotation=None,
847847
dashpad=3,
848848
dashpush=0,
849-
xaxis=True,
850849
):
851850

852851
Text.__init__(self, x=x, y=y, text=text, color=color,

0 commit comments

Comments
 (0)