Title: backend_svg fails with dashed line style · Issue #17290 · matplotlib/matplotlib · GitHub
Open Graph Title: backend_svg fails with dashed line style · Issue #17290 · matplotlib/matplotlib
X Title: backend_svg fails with dashed line style · Issue #17290 · matplotlib/matplotlib
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("...
Open Graph 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)...
X 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, ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17290
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"backend_svg fails with dashed line style","articleBody":"When using a dashed line style, the SVG backend fails. MWE:\r\n```python\r\nimport matplotlib.pyplot as plt\r\n\r\nplt.style.use({\"axes.grid\": True, \"grid.linestyle\": (10, 10)})\r\n\r\nx = [1, 2, 3]\r\ny = [1, 2, 3]\r\nplt.plot(x, y)\r\n# plt.show() # works fine\r\nplt.savefig(\"out.svg\")\r\n```\r\n```\r\n[...]\r\n File \"~/.local/lib/python3.8/site-packages/matplotlib/backends/backend_svg.py\", line 435, in _get_style_dict\r\n attrib['stroke-dashoffset'] = short_float_fmt(float(offset))\r\nTypeError: float() argument must be a string or a number, not 'NoneType'\r\n```","author":{"url":"https://github.com/nschloe","@type":"Person","name":"nschloe"},"datePublished":"2020-05-01T08:56:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/17290/matplotlib/issues/17290"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:47069d58-3fe2-8243-b535-f0fde9d6a82d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A062:1F7C65:282A77:35A9DB:6A540193 |
| html-safe-nonce | a2c02ebed04a54ff5aa7e065968fd924314c0fa29f911cd49aef407e6a4253fb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDYyOjFGN0M2NToyODJBNzc6MzVBOURCOjZBNTQwMTkzIiwidmlzaXRvcl9pZCI6IjU0NDQ2NDg4NDIyNzEzOTIxNDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3f39094e21ba653743fc7bbba9e6da316ae14c978f2cdc24e71ce23aeee35839 |
| hovercard-subject-tag | issue:610649123 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/17290/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dff02974bebd42cf8019d1cb4b5f775df6ec6baf0d1e4246fe8bc5032237952e/matplotlib/matplotlib/issues/17290 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dff02974bebd42cf8019d1cb4b5f775df6ec6baf0d1e4246fe8bc5032237952e/matplotlib/matplotlib/issues/17290 |
| og:image:alt | 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)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nschloe |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width