Closed
Description
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'