Title: BUG: PDF export seems wrong with dash sequences that include a None offset · Issue #8405 · matplotlib/matplotlib · GitHub
Open Graph Title: BUG: PDF export seems wrong with dash sequences that include a None offset · Issue #8405 · matplotlib/matplotlib
X Title: BUG: PDF export seems wrong with dash sequences that include a None offset · Issue #8405 · matplotlib/matplotlib
Description: Bug summary Custom dash sequences of the form (None, on_off_seq) seem to be rendered as solid lines in PDF exports. Code for reproduction import matplotlib.pyplot as plt fig, ax = plt.subplots(num="mwe") linestyles = ('dashed', '--', (No...
Open Graph Description: Bug summary Custom dash sequences of the form (None, on_off_seq) seem to be rendered as solid lines in PDF exports. Code for reproduction import matplotlib.pyplot as plt fig, ax = plt.subplots(num=...
X Description: Bug summary Custom dash sequences of the form (None, on_off_seq) seem to be rendered as solid lines in PDF exports. Code for reproduction import matplotlib.pyplot as plt fig, ax = plt.subplots(num=...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8405
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BUG: PDF export seems wrong with dash sequences that include a None offset","articleBody":"**Bug summary**\r\n\r\nCustom dash sequences of the form (None, on_off_seq) seem to be rendered as solid lines in PDF exports.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\n\r\nfig, ax = plt.subplots(num=\"mwe\")\r\n\r\nlinestyles = ('dashed', '--', (None, (3.7, 1.6)), (0, (3.7, 1.6)))\r\nfor y, ls in enumerate(linestyles):\r\n ax.plot([y]*2, ls=ls, label='{0}'.format(ls))\r\n\r\nax.set_ylim(-0.5, len(linestyles) - 0.5) # useful on mpl \u003c 2\r\nax.legend()\r\n\r\nfor ext in ('.png', '.pdf'):\r\n fig.savefig(fig.get_label() + ext)\r\n```\r\n\r\n**Actual outcome**\r\n\r\nPlease note that the picture above is a manual screenshot of the PDF produced with Matplotlib. For an unknown reason, GitHub does not allow me to upload the original PDF file… \r\n\r\n**Expected outcome**\r\nSomething like the PNG export of the same plot:\r\n\r\n\r\nBoth PNG and PDF look fine when exported with Matplotlib 1.5.1 (from conda). PDF export seems to be “broken” in this case both with Matplotlib 2.0.0 (from conda) and and master (from GitHub).\r\n\r\nOS: CentOS 7\r\nPython: 2.7\r\n","author":{"url":"https://github.com/afvincent","@type":"Person","name":"afvincent"},"datePublished":"2017-03-30T12:36:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/8405/matplotlib/issues/8405"}
| 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:aabc3c09-1e20-dfb7-e65f-7e4e23b95728 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E6FC:2A0FAF:235BA88:3019C3E:6A54259E |
| html-safe-nonce | 6990c5edf8829c3c767368b015f06528f438b89ab920dda424ad7161f1c9a324 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkZDOjJBMEZBRjoyMzVCQTg4OjMwMTlDM0U6NkE1NDI1OUUiLCJ2aXNpdG9yX2lkIjoiNDI4ODY1OTgyOTA3MjA3ODIzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5b96cb4a772501b7fc6ac842a57ee6e1f2d5c7152d76bc6fb13ca20a05092164 |
| hovercard-subject-tag | issue:218182550 |
| 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/8405/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5049b367e2fc68eab54f3d840a23f577098a24210f46b01655b7313b781c9c04/matplotlib/matplotlib/issues/8405 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5049b367e2fc68eab54f3d840a23f577098a24210f46b01655b7313b781c9c04/matplotlib/matplotlib/issues/8405 |
| og:image:alt | Bug summary Custom dash sequences of the form (None, on_off_seq) seem to be rendered as solid lines in PDF exports. Code for reproduction import matplotlib.pyplot as plt fig, ax = plt.subplots(num=... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | afvincent |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width