Title: Different line styles between PNG and PDF exports. · Issue #6588 · matplotlib/matplotlib · GitHub
Open Graph Title: Different line styles between PNG and PDF exports. · Issue #6588 · matplotlib/matplotlib
X Title: Different line styles between PNG and PDF exports. · Issue #6588 · matplotlib/matplotlib
Description: Is the line style supposed to depend on the export backend? MPL 1.5.1 is from Anaconda and MPL 2.x is from Github, both on Linux (CentOS 7) With MPL 1.5.1, I get the same line styles between both PDF and PNG exports: PNG @ 100 DPI: PDF @...
Open Graph Description: Is the line style supposed to depend on the export backend? MPL 1.5.1 is from Anaconda and MPL 2.x is from Github, both on Linux (CentOS 7) With MPL 1.5.1, I get the same line styles between both P...
X Description: Is the line style supposed to depend on the export backend? MPL 1.5.1 is from Anaconda and MPL 2.x is from Github, both on Linux (CentOS 7) With MPL 1.5.1, I get the same line styles between both P...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/6588
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Different line styles between PNG and PDF exports.","articleBody":"### Is the line style supposed to depend on the export backend?\n\n_MPL 1.5.1 is from Anaconda and MPL 2.x is from Github, both on Linux (CentOS 7)_\n\nWith MPL 1.5.1, I get the same line styles between both PDF and PNG exports:\n- PNG @ 100 DPI: \n\n\n- PDF @ None DPI: [MPL_ver_1.5.1_None.pdf](https://github.com/matplotlib/matplotlib/files/316429/MPL_ver_1.5.1_None.pdf)\n\nwhile with master version, they are different between PDF and PNG exports:\n- PNG @ 100 DPI: \n\n\n- PDF @ None DPI: [MPL_ver_2.0.0b1.post1628+g1aba7c3_None.pdf](https://github.com/matplotlib/matplotlib/files/316430/MPL_ver_2.0.0b1.post1628.g1aba7c3_None.pdf)\n\nNB: the problem seems to be independent from the DPI value: I get similar line styles between both PNG exports with 100 DPI and 300 DPI.\n- PNG @ 300 DPI: \n\n\n\nThe example snippet is\n\n``` python\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\n\ntest_case = matplotlib.__version__\n\nfig, ax = plt.subplots(num=test_case, figsize=(4.8, 3.2))\nax.set_title(\"MPL version: {0:s}\".format(test_case))\n\nxx = np.array([0.0, 1.0])\n\nax.plot(xx, 1 * xx, ls='dashed', label='default lw')\nax.plot(xx, 2 * xx, ls='dashed', lw=2, label='lw=2')\nax.plot(xx, 3 * xx, ls='dashed', lw=3, label='lw=3')\n\nax.legend(loc='upper left')\n\nplt.show()\n\nfor ext, dpi in (('pdf', None), ('png', 100), ('png', 300)):\n fig.savefig(\"MPL_ver_{v:s}_{d}.{e:s}\".format(v=test_case, d=dpi, e=ext),\n dpi=dpi)\n```\n\nMy guess would that I may be somehow related to the new behavior introduced in #5926, _but I didn't have time to have a look yet_.\n","author":{"url":"https://github.com/afvincent","@type":"Person","name":"afvincent"},"datePublished":"2016-06-15T15:36:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/6588/matplotlib/issues/6588"}
| 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:c18ae4bc-ff9c-f6fe-364c-0d0937f7ed8b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9396:32BAC1:56E87E:74E7BC:6A529BA8 |
| html-safe-nonce | adb7b56a65a1b13025de5b87bd0a65f3738ee523ac397f2e01f6484130872993 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Mzk2OjMyQkFDMTo1NkU4N0U6NzRFN0JDOjZBNTI5QkE4IiwidmlzaXRvcl9pZCI6Ijg3MjQ0MzUwNTA4OTA5NTk3ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f61944e641a9dfabc1539b8660478e7b3ab57b4c9c90493efa3d54530ccda6c8 |
| hovercard-subject-tag | issue:160453862 |
| 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/6588/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dd3c15dadb633474118f2b030d15c033005e3c8baad2cb4acbea74ca4a2ea8ee/matplotlib/matplotlib/issues/6588 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dd3c15dadb633474118f2b030d15c033005e3c8baad2cb4acbea74ca4a2ea8ee/matplotlib/matplotlib/issues/6588 |
| og:image:alt | Is the line style supposed to depend on the export backend? MPL 1.5.1 is from Anaconda and MPL 2.x is from Github, both on Linux (CentOS 7) With MPL 1.5.1, I get the same line styles between both P... |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width