From 59ada9b1b4c8195e280c0bf6368be25e58b8a0e6 Mon Sep 17 00:00:00 2001 From: Guillaume Poulin Date: Tue, 10 Sep 2013 22:12:55 +0800 Subject: [PATCH] More bugfixes in SVGExporter.py --- pyqtgraph/exporters/SVGExporter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/exporters/SVGExporter.py b/pyqtgraph/exporters/SVGExporter.py index 7c48c8a9..821427a4 100644 --- a/pyqtgraph/exporters/SVGExporter.py +++ b/pyqtgraph/exporters/SVGExporter.py @@ -350,9 +350,9 @@ def correctCoordinates(node, item): continue if ch.tagName == 'polyline': removeTransform = True - coords = np.array([map(float, c.split(',')) for c in ch.getAttribute('points').strip().split(' ')]) + coords = np.array([[float(a) for a in c.split(',')] for c in ch.getAttribute('points').strip().split(' ')]) coords = pg.transformCoordinates(tr, coords, transpose=True) - ch.setAttribute('points', ' '.join([','.join(map(str, c)) for c in coords])) + ch.setAttribute('points', ' '.join([','.join([str(a) for a in c]) for c in coords])) elif ch.tagName == 'path': removeTransform = True newCoords = ''