Skip to content

Commit cc57150

Browse files
committed
Revert some style changes
1 parent 5aa2ab4 commit cc57150

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

lib/matplotlib/text.py

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -318,20 +318,18 @@ def _get_layout(self, renderer):
318318

319319
# Find full vertical extent of font,
320320
# including ascenders and descenders:
321-
tmp, lp_h, lp_bl = renderer.get_text_width_height_descent(
322-
'lp',
323-
self._fontproperties,
324-
ismath=False)
321+
tmp, lp_h, lp_bl = renderer.get_text_width_height_descent('lp',
322+
self._fontproperties,
323+
ismath=False)
325324
offsety = (lp_h - lp_bl) * self._linespacing
326325

327326
baseline = 0
328327
for i, line in enumerate(lines):
329328
clean_line, ismath = self.is_math_text(line)
330329
if clean_line:
331-
w, h, d = renderer.get_text_width_height_descent(
332-
clean_line,
333-
self._fontproperties,
334-
ismath=ismath)
330+
w, h, d = renderer.get_text_width_height_descent(clean_line,
331+
self._fontproperties,
332+
ismath=ismath)
335333
else:
336334
w, h, d = 0, 0, 0
337335

@@ -473,12 +471,12 @@ def set_bbox(self, rectprops):
473471
bbox_transmuter = props.pop("bbox_transmuter", None)
474472

475473
self._bbox_patch = FancyBboxPatch(
476-
(0., 0.),
477-
1., 1.,
478-
boxstyle=boxstyle,
479-
bbox_transmuter=bbox_transmuter,
480-
transform=mtransforms.IdentityTransform(),
481-
**props)
474+
(0., 0.),
475+
1., 1.,
476+
boxstyle=boxstyle,
477+
bbox_transmuter=bbox_transmuter,
478+
transform=mtransforms.IdentityTransform(),
479+
**props)
482480
self._bbox = None
483481
else:
484482
self._bbox_patch = None
@@ -912,7 +910,7 @@ def get_window_extent(self, renderer=None, dpi=None):
912910
the value used when saving the figure, then the value that
913911
was used must be specified as the *dpi* argument.
914912
'''
915-
# return _unit_box
913+
#return _unit_box
916914
if not self.get_visible():
917915
return Bbox.unit()
918916
if dpi is not None:
@@ -1323,7 +1321,7 @@ def __init__(self,
13231321
self._dashpad = dashpad
13241322
self._dashpush = dashpush
13251323

1326-
# self.set_bbox(dict(pad=0))
1324+
#self.set_bbox(dict(pad=0))
13271325

13281326
def get_position(self):
13291327
"Return the position of the text as a tuple (*x*, *y*)"
@@ -1763,7 +1761,7 @@ def _get_ref_xy(self, renderer):
17631761
if isinstance(self.xycoords, tuple):
17641762
s1, s2 = self.xycoords
17651763
if ((is_string_like(s1) and s1.split()[0] == "offset") or
1766-
(is_string_like(s2) and s2.split()[0] == "offset")):
1764+
(is_string_like(s2) and s2.split()[0] == "offset")):
17671765
raise ValueError("xycoords should not be an offset coordinate")
17681766
x, y = self.xy
17691767
x1, y1 = self._get_xy(renderer, x, y, s1)
@@ -1775,7 +1773,7 @@ def _get_ref_xy(self, renderer):
17751773
else:
17761774
x, y = self.xy
17771775
return self._get_xy(renderer, x, y, self.xycoords)
1778-
# raise RuntimeError("must be defined by the derived class")
1776+
#raise RuntimeError("must be defined by the derived class")
17791777

17801778
# def _get_bbox(self, renderer):
17811779
# if hasattr(bbox, "bounds"):
@@ -2079,7 +2077,7 @@ def _update_position_xytext(self, renderer, xy_pixel):
20792077
# Use FancyArrowPatch if self.arrowprops has "arrowstyle" key.
20802078
# Otherwise, fallback to YAArrow.
20812079

2082-
# if d.has_key("arrowstyle"):
2080+
#if d.has_key("arrowstyle"):
20832081
if self.arrow_patch:
20842082

20852083
# adjust the starting point of the arrow relative to

0 commit comments

Comments
 (0)