When using a dashed line style, the SVG backend fails. MWE:
import matplotlib.pyplot as plt plt.style.use({"axes.grid": True, "grid.linestyle": (10, 10)}) x = [1, 2, 3] y = [1, 2, 3] plt.plot(x, y) # plt.show() # works fine plt.savefig("out.svg")
[...] File "~/.local/lib/python3.8/site-packages/matplotlib/backends/backend_svg.py", line 435, in _get_style_dict attrib['stroke-dashoffset'] = short_float_fmt(float(offset)) TypeError: float() argument must be a string or a number, not 'NoneType'
This was fixed in master by #15828 (which will be in 3.3).
Activity
anntzer commented on May 1, 2020
This was fixed in master by #15828 (which will be in 3.3).