set preserve aspect ratio on the outer most SVG generated in compose_view as it is not passed through as_svg
@@ -303,6 +303,9 @@ def compose_view(bg_svgs, fg_svgs, ref=0, out_file='report.svg'):
svgt.GroupElement(roots[3:], {'class': 'foreground-svg'})
]
fig.append(newroots)
+ fig.root.set("width", "")
+ fig.root.set("height", "")
+ fig.root.set("preserveAspectRatio", "xMidYMid meet")
out_file = op.abspath(out_file)
fig.save(out_file)
