Title: contour ignores `lw` argument, no warning/error · Issue #13848 · matplotlib/matplotlib · GitHub
Open Graph Title: contour ignores `lw` argument, no warning/error · Issue #13848 · matplotlib/matplotlib
X Title: contour ignores `lw` argument, no warning/error · Issue #13848 · matplotlib/matplotlib
Description: Bug report The command contour does not use lw arguments (unlike, e.g., plot), and does not report an error or warning. The linewidths argument works fine. A simple fix is to explicitly look for lw arguments and set linewidths to that. H...
Open Graph Description: Bug report The command contour does not use lw arguments (unlike, e.g., plot), and does not report an error or warning. The linewidths argument works fine. A simple fix is to explicitly look for lw...
X Description: Bug report The command contour does not use lw arguments (unlike, e.g., plot), and does not report an error or warning. The linewidths argument works fine. A simple fix is to explicitly look for lw...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/13848
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"contour ignores `lw` argument, no warning/error","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\nThe command `contour` does not use `lw` arguments (unlike, e.g., `plot`), and does not report an error or warning. The `linewidths` argument works fine. A simple fix is to explicitly look for `lw` arguments and set `linewidths` to that. Happy to put in a PR for this, but I wanted to check first.\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib as mpl\r\nimport matplotlib.pyplot as plt\r\nprint(mpl.__version__)\r\n\r\nfig, axes = plt.subplots(ncols=3)\r\n\r\nfor ax, lw, arg in zip(axes, [1.0, 4.0, 4.0], ['lw', 'lw', 'linewidths']):\r\n aa = np.random.normal(size=1000)\r\n bb = np.random.normal(size=aa.size)\r\n hist, xe, ye = np.histogram2d(aa, bb)\r\n kw = {arg: lw}\r\n ax.contour(hist, **kw)\r\n ax.set_title('{}: {}'.format(arg, lw))\r\n\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n\r\n**Matplotlib version**\r\n * Matplotlib version: 3.0.2\r\n","author":{"url":"https://github.com/lzkelley","@type":"Person","name":"lzkelley"},"datePublished":"2019-04-02T18:50:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/13848/matplotlib/issues/13848"}
| 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:c6e70302-a49a-5c97-8c94-60e34ee9d561 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D10C:191DCC:218EE1B:2D00DEB:6A53849E |
| html-safe-nonce | ee914601d0ae88524443f67d511c08b94d4f5fe4aedb705689382e63617a92ea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTBDOjE5MURDQzoyMThFRTFCOjJEMDBERUI6NkE1Mzg0OUUiLCJ2aXNpdG9yX2lkIjoiMzQ2MjkzNTA4MzQ2NzYzNzkxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2b27d9b6b5f2bd075f51954c8ba06cbf6006ff8a890629d3481a8d669bfc4990 |
| hovercard-subject-tag | issue:428386216 |
| 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/13848/issue_layout |
| twitter:image | https://opengraph.githubassets.com/647def0ef1288a777715441140b696ea783cd2af5cd081525ba0bb85ddc592c9/matplotlib/matplotlib/issues/13848 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/647def0ef1288a777715441140b696ea783cd2af5cd081525ba0bb85ddc592c9/matplotlib/matplotlib/issues/13848 |
| og:image:alt | Bug report The command contour does not use lw arguments (unlike, e.g., plot), and does not report an error or warning. The linewidths argument works fine. A simple fix is to explicitly look for lw... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lzkelley |
| 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