Title: Soft-deprecate dashes in favor of linestyle · Issue #17483 · matplotlib/matplotlib · GitHub
Open Graph Title: Soft-deprecate dashes in favor of linestyle · Issue #17483 · matplotlib/matplotlib
X Title: Soft-deprecate dashes in favor of linestyle · Issue #17483 · matplotlib/matplotlib
Description: dashes are just a more limited form of linestyles. Actually, they are no more than: def set_dashes(self, seq): if seq == (None, None) or len(seq) == 0: self.set_linestyle('-') else: self.set_linestyle((0, seq)) I propose to soft-deprecat...
Open Graph Description: dashes are just a more limited form of linestyles. Actually, they are no more than: def set_dashes(self, seq): if seq == (None, None) or len(seq) == 0: self.set_linestyle('-') else: self.set_linest...
X Description: dashes are just a more limited form of linestyles. Actually, they are no more than: def set_dashes(self, seq): if seq == (None, None) or len(seq) == 0: self.set_linestyle('-') else: self.se...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17483
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Soft-deprecate dashes in favor of linestyle","articleBody":"[dashes](https://matplotlib.org/devdocs/api/_as_gen/matplotlib.lines.Line2D.html#matplotlib.lines.Line2D.set_dashes) are just a more limited form of linestyles. Actually, they are no more than:\r\n\r\n~~~\r\n def set_dashes(self, seq):\r\n if seq == (None, None) or len(seq) == 0:\r\n self.set_linestyle('-')\r\n else:\r\n self.set_linestyle((0, seq))\r\n~~~\r\n\r\nI propose to soft-deprecate dashes in favor of linestyle. Dashes are redundant and thus only increase the API complexity without any benefit. OTOH I don't think we should deprecate dashes because there might be quite a bit of code out there using it.\r\n\r\nSpecific actions for this task:\r\n\r\n- [ ] `linestyle` should directly accept a dash pattern. - It currently only accepts `(offset, dash_pattern)`.\r\n- [ ] Change all internal code and examples to use `set_linestyle`.\r\n- [ ] In `set_dashes`, recommend to use `set_linestyle` instead.\r\n- [ ] Add an API change note along the lines.\r\n\r\n","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2020-05-22T00:10:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/17483/matplotlib/issues/17483"}
| 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:50695f5a-040b-6c45-0b61-330d873005d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C65C:2086C7:4608807:620892F:6A4F7427 |
| html-safe-nonce | 4150056470e7e329f692978fd29c3d05219c544c190a628a5e0d33902c5a8272 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjVDOjIwODZDNzo0NjA4ODA3OjYyMDg5MkY6NkE0Rjc0MjciLCJ2aXNpdG9yX2lkIjoiNDkzNjYwMTU0MTY5Mzg5NTcxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ac7ea2034ae297c54330e2ee56633cd19f78465c3d97374b7cd7eedc1f2a64f7 |
| hovercard-subject-tag | issue:622863863 |
| 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/17483/issue_layout |
| twitter:image | https://opengraph.githubassets.com/384bed608451225777223804be9ad3138907eacd6d88f64c9e05f7d753bb70c5/matplotlib/matplotlib/issues/17483 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/384bed608451225777223804be9ad3138907eacd6d88f64c9e05f7d753bb70c5/matplotlib/matplotlib/issues/17483 |
| og:image:alt | dashes are just a more limited form of linestyles. Actually, they are no more than: def set_dashes(self, seq): if seq == (None, None) or len(seq) == 0: self.set_linestyle('-') else: self.set_linest... |
| 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 | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| 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 | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width