diff --git a/pyqtgraph/exporters/SVGExporter.py b/pyqtgraph/exporters/SVGExporter.py
index 751a10c1..ac51732f 100644
--- a/pyqtgraph/exporters/SVGExporter.py
+++ b/pyqtgraph/exporters/SVGExporter.py
@@ -114,9 +114,9 @@ def generateSvg(item, options={}):
for d in defs:
defsXml += d.toprettyxml(indent=' ')
defsXml += "\n"
- svgAttributes = f' viewBox ="0 0 {options["width"]} {options["height"]}"'
+ svgAttributes = ' viewBox ="0 0 %f %f"' % (options["width"], options["height"])
c = options['background']
- backgroundtag = f'\n'
+ backgroundtag = '\n' % (c.red(), c.blue(), c.green(), c.alpha()/255.0)
return (xmlHeader % svgAttributes) + backgroundtag + defsXml + node.toprettyxml(indent=' ') + "\n\n"