FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

backend_svg fails with dashed line style · Issue #17290 · matplotlib/matplotlib · GitHub

Repository navigation

backend_svg fails with dashed line style #17290

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'

Activity

  1. anntzer commented on May 1, 2020

    Contributor

    This was fixed in master by #15828 (which will be in 3.3).

  2. added this to the v3.3.0 milestone on May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL