Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit848fa10

Browse files
committed
Work around TextWithDash not accepting all kwargs of Text
1 parenta34c617 commit848fa10

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎lib/matplotlib/axes/_axes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,9 +712,10 @@ def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
712712
# a dash to TextWithDash and dashlength.
713713

714714
ifwithdash:
715-
t=mtext.TextWithDash(x,y,text=s,**effective_kwargs)
715+
t=mtext.TextWithDash(x,y,text=s)
716716
else:
717-
t=mtext.Text(x,y,text=s,**effective_kwargs)
717+
t=mtext.Text(x,y,text=s)
718+
t.update(effective_kwargs)
718719

719720
t.set_clip_path(self.patch)
720721
self._add_text(t)

‎lib/matplotlib/text.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,8 @@ def __init__(self,
13631363
multialignment=multialignment,
13641364
fontproperties=fontproperties,
13651365
rotation=rotation,
1366-
linespacing=linespacing)
1366+
linespacing=linespacing,
1367+
)
13671368

13681369
# The position (x,y) values for text and dashline
13691370
# are bogus as given in the instantiation; they will

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp