Title: [Doc]: Clarify default capstyle · Issue #21979 · matplotlib/matplotlib · GitHub
Open Graph Title: [Doc]: Clarify default capstyle · Issue #21979 · matplotlib/matplotlib
X Title: [Doc]: Clarify default capstyle · Issue #21979 · matplotlib/matplotlib
Description: Documentation Link https://matplotlib.org/devdocs/api/_enums_api.html#matplotlib._enums.CapStyle Problem The demo states that the default capstyle is projecting, which is true for Line2D but not for PathPatch (where the default is 'butt'...
Open Graph Description: Documentation Link https://matplotlib.org/devdocs/api/_enums_api.html#matplotlib._enums.CapStyle Problem The demo states that the default capstyle is projecting, which is true for Line2D but not fo...
X Description: Documentation Link https://matplotlib.org/devdocs/api/_enums_api.html#matplotlib._enums.CapStyle Problem The demo states that the default capstyle is projecting, which is true for Line2D but not fo...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/21979
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Doc]: Clarify default capstyle","articleBody":"### Documentation Link\n\nhttps://matplotlib.org/devdocs/api/_enums_api.html#matplotlib._enums.CapStyle\n\n### Problem\n\nThe demo states that the default capstyle is `projecting`, which is true for `Line2D` but not for `PathPatch` (where the default is 'butt').\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib as mpl\r\n\r\nfig,ax = plt.subplots(figsize=(2,1), layout='constrained')\r\n\r\nxx = [0, 1]\r\nyy = [0, 0]\r\nax.plot(xx, yy, lw=12, color='tab:blue')\r\nax.plot(xx, yy, lw=1, color='black')\r\nax.plot(xx, yy, 'o', color='tab:red', markersize=3)\r\nax.add_patch(mpl.patches.PathPatch(mpl.path.Path([[0, 0],[1, 0]]), lw=20, color='C1'))\r\nax.set_axis_off()\r\n```\r\n\r\n\r\n(see also https://stackoverflow.com/a/70381813/3944322)\r\n\n\n### Suggested improvement\n\nChange `(default)` to `(default for Line2D)` in https://github.com/matplotlib/matplotlib/blob/98115e9b5134f4c71dc196a56f6ed8df4737174a/lib/matplotlib/_enums.py#L171\n\n### Matplotlib Version\n\n3.5.0","author":{"url":"https://github.com/StefRe","@type":"Person","name":"StefRe"},"datePublished":"2021-12-16T16:32:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/21979/matplotlib/issues/21979"}
| 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:73ab25f5-2d8a-aa24-878f-4e0adda695b8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA3C:899DA:177461A:1FEEA7E:6A509005 |
| html-safe-nonce | f400f7ca38b3666781ece9396819f667c4cd0e1401359100e80a6a5c39192c30 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTNDOjg5OURBOjE3NzQ2MUE6MUZFRUE3RTo2QTUwOTAwNSIsInZpc2l0b3JfaWQiOiIzOTYzNjQ2MTg5MDYxMDUwMzczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d3e5ada5c5ce35ec05a8a139c3bc52999b80c467f7e05a01ae48c75137a27de3 |
| hovercard-subject-tag | issue:1082411304 |
| 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/21979/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8540151af8b1df2ea9a6c5d8fde6c3973e9fc2887a0b19bb064f6d32c0818991/matplotlib/matplotlib/issues/21979 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8540151af8b1df2ea9a6c5d8fde6c3973e9fc2887a0b19bb064f6d32c0818991/matplotlib/matplotlib/issues/21979 |
| og:image:alt | Documentation Link https://matplotlib.org/devdocs/api/_enums_api.html#matplotlib._enums.CapStyle Problem The demo states that the default capstyle is projecting, which is true for Line2D but not fo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | StefRe |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| 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 | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width