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

Skip to content

Commit 65fbe95

Browse files
authored
Merge pull request #31069 from anntzer/wideaccent
Fix positioning of wide mathtext accents.
2 parents d57abf4 + c2fa7ba commit 65fbe95

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/matplotlib/_mathtext.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,12 +2324,13 @@ def accent(self, toks: ParseResults) -> T.Any:
23242324
if accent in self._wide_accents:
23252325
accent_box = AutoWidthChar(
23262326
'\\' + accent, sym.width, state, char_class=Accent)
2327+
centered = HCentered([accent_box])
23272328
else:
23282329
accent_box = Accent(self._accent_map[accent], state)
2329-
if accent == 'mathring':
2330-
accent_box.shrink()
2331-
accent_box.shrink()
2332-
centered = HCentered([Hbox(sym.width / 4.0), accent_box])
2330+
if accent == 'mathring':
2331+
accent_box.shrink()
2332+
accent_box.shrink()
2333+
centered = HCentered([Hbox(sym.width / 4.0), accent_box])
23332334
centered.hpack(sym.width, 'exactly')
23342335
return Vlist([
23352336
centered,

0 commit comments

Comments
 (0)