Skip to content

Commit 2913f08

Browse files
committed
Exchange variable names
1 parent 9649d83 commit 2913f08

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/matplotlib/_mathtext.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,32 +2859,32 @@ def binom(self, s, loc, toks):
28592859
return self._genfrac('(', ')', 0.0, self._MathStyle.TEXTSTYLE,
28602860
num, den)
28612861

2862-
def _genset(self, state, body, annotation, overunder):
2862+
def _genset(self, state, annotation, body, overunder):
28632863
thickness = state.font_output.get_underline_thickness(
28642864
state.font, state.fontsize, state.dpi)
28652865

2866-
body.shrink()
2866+
annotation.shrink()
28672867

2868-
cbody = HCentered([body])
28692868
cannotation = HCentered([annotation])
2870-
width = max(cbody.width, cannotation.width)
2871-
cbody.hpack(width, 'exactly')
2869+
cbody = HCentered([body])
2870+
width = max(cannotation.width, cbody.width)
28722871
cannotation.hpack(width, 'exactly')
2872+
cbody.hpack(width, 'exactly')
28732873

28742874
vgap = thickness * 3
28752875
if overunder == "under":
2876-
vlist = Vlist([cannotation, # annotation
2877-
Vbox(0, vgap), # space
2878-
cbody # body
2876+
vlist = Vlist([cbody, # body
2877+
Vbox(0, vgap), # space
2878+
cannotation # annotation
28792879
])
2880-
# Shift so the annotation sits in the same vertical position
2881-
shift_amount = cannotation.depth + cbody.height + vgap
2880+
# Shift so the body sits in the same vertical position
2881+
shift_amount = cbody.depth + cannotation.height + vgap
28822882

28832883
vlist.shift_amount = shift_amount
28842884
else:
2885-
vlist = Vlist([cbody, # body
2886-
Vbox(0, vgap), # space
2887-
cannotation # annotation
2885+
vlist = Vlist([cannotation, # annotation
2886+
Vbox(0, vgap), # space
2887+
cbody # body
28882888
])
28892889

28902890
# To add horizontal gap between symbols: wrap the Vlist into
@@ -2956,18 +2956,18 @@ def overset(self, s, loc, toks):
29562956
assert len(toks[0]) == 2
29572957

29582958
state = self.get_state()
2959-
body, annotation = toks[0]
2959+
annotation, body = toks[0]
29602960

2961-
return self._genset(state, body, annotation, overunder="over")
2961+
return self._genset(state, annotation, body, overunder="over")
29622962

29632963
def underset(self, s, loc, toks):
29642964
assert len(toks) == 1
29652965
assert len(toks[0]) == 2
29662966

29672967
state = self.get_state()
2968-
body, annotation = toks[0]
2968+
annotation, body = toks[0]
29692969

2970-
return self._genset(state, body, annotation, overunder="under")
2970+
return self._genset(state, annotation, body, overunder="under")
29712971

29722972
def _auto_sized_delimiter(self, front, middle, back):
29732973
state = self.get_state()

0 commit comments

Comments
 (0)