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

Skip to content

Commit 5d73cfb

Browse files
author
Peter Würtz
committed
Merge pull request #1240 from pwuertz/pgf-backend
backend_pgf: fix parsing of CR+LF newlines
2 parents 3dfd380 + 6f95056 commit 5d73cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def get_width_height_descent(self, text, prop):
340340

341341
# parse metrics from the answer string
342342
try:
343-
width, height, offset = answer.split("\n")[0].split(",")
343+
width, height, offset = answer.splitlines()[0].split(",")
344344
except:
345345
msg = "Error processing '%s'\nLaTeX Output:\n%s" % (text, answer)
346346
raise ValueError(msg)

0 commit comments

Comments
 (0)