A reproducible example can be found here: https://github.com/YDS67/rust-plotly-examples/tree/main/example5 I used scale 1 and resolution 1280x768 for both PNG and SVG. Using different scales for SVG just messed up the image. PNG works fine, but there seems to be a limit on max font size. I haven't been able to find any way to increase the legend width manually.