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

Commitf219056

Browse files
committed
Fix#4335: mathtext whitespacing commands
Conflicts:lib/matplotlib/tests/test_mathtext.py
1 parent4c18969 commitf219056

11 files changed

+238
-9
lines changed

‎lib/matplotlib/_mathtext_data.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,6 @@
19461946
'boxminus' :8863,
19471947
'equiv' :8801,
19481948
'Lleftarrow' :8666,
1949-
'thinspace' :8201,
19501949
'll' :8810,
19511950
'Cup' :8915,
19521951
'measeq' :8798,
@@ -2169,7 +2168,6 @@
21692168
'cdots' :8943,
21702169
'hat' :770,
21712170
'eqgtr' :8925,
2172-
'enspace' :8194,
21732171
'psi' :968,
21742172
'frown' :8994,
21752173
'acute' :769,

‎lib/matplotlib/mathtext.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,13 +2431,18 @@ def _make_space(self, percentage):
24312431
self._em_width_cache[key]=width
24322432
returnKern(width*percentage)
24332433

2434-
_space_widths= {r'\ ' :0.3,
2435-
r'\,' :0.4,
2436-
r'\;' :0.8,
2437-
r'\quad' :1.6,
2438-
r'\qquad' :3.2,
2439-
r'\!' :-0.4,
2440-
r'\/' :0.4 }
2434+
_space_widths= {r'\,' :0.16667,# 3/18 em = 3 mu
2435+
r'\thinspace' :0.16667,# 3/18 em = 3 mu
2436+
r'\/' :0.16667,# 3/18 em = 3 mu
2437+
r'\>' :0.22222,# 4/18 em = 4 mu
2438+
r'\:' :0.22222,# 4/18 em = 4 mu
2439+
r'\;' :0.27778,# 5/18 em = 5 mu
2440+
r'\ ' :0.33333,# 6/18 em = 6 mu
2441+
r'\enspace' :0.5,# 9/18 em = 9 mu
2442+
r'\quad' :1,# 1 em = 18 mu
2443+
r'\qquad' :2,# 2 em = 36 mu
2444+
r'\!' :-0.16667,# -3/18 em = -3 mu
2445+
}
24412446
defspace(self,s,loc,toks):
24422447
assert(len(toks)==1)
24432448
num=self._space_widths[toks[0]]
Binary file not shown.
Lines changed: 97 additions & 0 deletions
Loading
Binary file not shown.
Lines changed: 74 additions & 0 deletions
Loading
Binary file not shown.
Lines changed: 55 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp