Title: Line2D and PathPatch have different defaults for capstyle and joinstyle · Issue #18597 · matplotlib/matplotlib · GitHub
Open Graph Title: Line2D and PathPatch have different defaults for capstyle and joinstyle · Issue #18597 · matplotlib/matplotlib
X Title: Line2D and PathPatch have different defaults for capstyle and joinstyle · Issue #18597 · matplotlib/matplotlib
Description: Describe the issue Noticed while working on #18579. Summary Capstyle and joinstyle of PathPatch and Line2D differ: c apstyle joinstyle Line2D projecting round PathPatch butt miter as can be seen in: import matplotlib.pyplot as plt from m...
Open Graph Description: Describe the issue Noticed while working on #18579. Summary Capstyle and joinstyle of PathPatch and Line2D differ: c apstyle joinstyle Line2D projecting round PathPatch butt miter as can be seen in...
X Description: Describe the issue Noticed while working on #18579. Summary Capstyle and joinstyle of PathPatch and Line2D differ: c apstyle joinstyle Line2D projecting round PathPatch butt miter as can be seen in...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18597
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Line2D and PathPatch have different defaults for capstyle and joinstyle","articleBody":"### Describe the issue\r\n\r\nNoticed while working on #18579.\r\n\r\n**Summary**\r\n\r\nCapstyle and joinstyle of `PathPatch` and `Line2D` differ:\r\n\r\n| | c apstyle | joinstyle |\r\n|-----------|------------|-----------|\r\n| Line2D | projecting | round |\r\n| PathPatch | butt | miter |\r\n\r\nas can be seen in:\r\n~~~\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.patches import Path, PathPatch\r\nx = [0, 5, 0]\r\ny = [0, 0, 2]\r\n\r\nax = plt.gca()\r\nax.axis('equal')\r\nax.set_xlim(-1, 7)\r\nax.plot(x, y, lw=20, alpha=0.5, label='Line2D')\r\nax.add_patch(PathPatch(Path(list(zip(x, y))), fill=False, ec='r', lw=20, label='PathPatch', capstyle='butt'))\r\nax.legend()\r\n~~~\r\n\r\n\r\n### Proposed fix\r\n\r\nThis is unexpected and must at least be documented.\r\n\r\nI'm unsure if we can afford to change the default of `PathPatch` (if we make a breaking change, it must be on `PathPatch`, `Line2D` is too often used and we cannot affort to change that.\r\n\r\nOpinions welcome.\r\n","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2020-09-27T21:58:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/18597/matplotlib/issues/18597"}
| 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:f4b31a23-53bf-54d4-9cf1-2a67bc53f790 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D1A:18EF60:948FC1:C6BEA7:6A52B15D |
| html-safe-nonce | 90ad3ae8356e18d8f6daaaeaf3315980edb286e3e8917f8da68ce4ac1a21d322 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDFBOjE4RUY2MDo5NDhGQzE6QzZCRUE3OjZBNTJCMTVEIiwidmlzaXRvcl9pZCI6IjM3MjU3MjIyMDIyMDY4MTA0NjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 774b6fa56c366720c674bb2ef5b9733eccd9f89cfd4a41960e5d2b36817b3432 |
| hovercard-subject-tag | issue:709823970 |
| 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/18597/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6c7170daf3ac14c4aca422be855f8ea4fcaae56320ae1f89aadaea97086d3f49/matplotlib/matplotlib/issues/18597 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6c7170daf3ac14c4aca422be855f8ea4fcaae56320ae1f89aadaea97086d3f49/matplotlib/matplotlib/issues/18597 |
| og:image:alt | Describe the issue Noticed while working on #18579. Summary Capstyle and joinstyle of PathPatch and Line2D differ: c apstyle joinstyle Line2D projecting round PathPatch butt miter as can be seen in... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timhoffm |
| 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