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

Appearance settings

Commit 7e91d71

Browse filesBrowse files
committed
Merge pull request #12 from ivanov/annotate_space
more complete fix for #1583 (multiple spaces)
2 parents 707edb5 + 3b857ab commit 7e91d71
Copy full SHA for 7e91d71

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎lib/matplotlib/text.py

Copy file name to clipboardExpand all lines: lib/matplotlib/text.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def draw(self, renderer):
524524
if renderer is not None:
525525
self._renderer = renderer
526526
if not self.get_visible(): return
527-
if self.get_text()=='': return
527+
if self.get_text().strip() == '': return
528528

529529
renderer.open_group('text', self.get_gid())
530530

@@ -1898,7 +1898,7 @@ def _update_position_xytext(self, renderer, xy_pixel):
18981898
props = props.copy() # don't want to alter the pad externally
18991899
pad = props.pop('pad', 4)
19001900
pad = renderer.points_to_pixels(pad)
1901-
if self.get_text() == "":
1901+
if self.get_text().strip() == "":
19021902
self.arrow_patch.set_patchA(None)
19031903
return
19041904

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.