Title: add_lines misses lines for matplotlib.colorbar.ColorbarBase · Issue #12458 · matplotlib/matplotlib · GitHub
Open Graph Title: add_lines misses lines for matplotlib.colorbar.ColorbarBase · Issue #12458 · matplotlib/matplotlib
X Title: add_lines misses lines for matplotlib.colorbar.ColorbarBase · Issue #12458 · matplotlib/matplotlib
Description: Bug report Bug summary For matplotlib.colorbar.ColorbarBase(...) usage of add_lines(...) may yield missing lines/poorly adjusted lines. Code for reproduction import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np fig...
Open Graph Description: Bug report Bug summary For matplotlib.colorbar.ColorbarBase(...) usage of add_lines(...) may yield missing lines/poorly adjusted lines. Code for reproduction import matplotlib.pyplot as plt import ...
X Description: Bug report Bug summary For matplotlib.colorbar.ColorbarBase(...) usage of add_lines(...) may yield missing lines/poorly adjusted lines. Code for reproduction import matplotlib.pyplot as plt import ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12458
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"add_lines misses lines for matplotlib.colorbar.ColorbarBase","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\n**Bug summary**\r\n\r\nFor matplotlib.colorbar.ColorbarBase(...) usage of add_lines(...) may yield missing lines/poorly adjusted lines.\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required--\u003e\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib as mpl\r\nimport numpy as np\r\n\r\nfig = plt.figure()\r\nax = fig.add_axes([0.05, 0.8, 0.9, 0.15])\r\ncmap = mpl.cm.cool\r\nnorm = mpl.colors.Normalize(vmin=-4, vmax=4)\r\nlevels = (-1.0, 1.0, 2.0, 3.0)\r\n\r\ncb = mpl.colorbar.ColorbarBase(ax, cmap=cmap, norm=norm)\r\ncolors_bg = np.tile(list((1.0, 1.0, 1.0, 1.0)), (len(levels), 1))\r\ncb.add_lines(levels=levels, colors=colors_bg, linewidths=7)\r\n\r\nplt.show()\r\n\r\n\r\n```\r\n\r\n**Expected outcome**\r\n\r\n4 white lines, crossing the colorbar.\r\nUsed to work on matplotlib 2.2.3!\r\n\r\n**Matplotlib version**\r\n * Operating system: Ubuntu 18.04 LTS\r\n * Matplotlib version: 3.0.0\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): Qt5Agg\r\n * Python version: 3.7.0\r\n\r\nMiniconda install, fully updated.","author":{"url":"https://github.com/e3reiter","@type":"Person","name":"e3reiter"},"datePublished":"2018-10-09T14:48:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/12458/matplotlib/issues/12458"}
| 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:628888c1-1a8b-424f-fd33-ec372315ac7a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E80A:28B0A3:93E8F2:C75351:6A529122 |
| html-safe-nonce | 058e8a898cc63237ebbda2f0c0739b1a0b2a9ec5183b4bf0dc5fda448eba7df1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODBBOjI4QjBBMzo5M0U4RjI6Qzc1MzUxOjZBNTI5MTIyIiwidmlzaXRvcl9pZCI6IjMyNjE4MDMzNjI3MjM3Mjk2OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 231f8ccf007f3789f154b2649b43d2387aae9ba4e4a499bf2b44a8dfe544542b |
| hovercard-subject-tag | issue:368249960 |
| 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/12458/issue_layout |
| twitter:image | https://opengraph.githubassets.com/103a832e9ed0c0ad717a86da90d96cdafb9d6f0cb9f83ac80ff8d0be4cdbdd3a/matplotlib/matplotlib/issues/12458 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/103a832e9ed0c0ad717a86da90d96cdafb9d6f0cb9f83ac80ff8d0be4cdbdd3a/matplotlib/matplotlib/issues/12458 |
| og:image:alt | Bug report Bug summary For matplotlib.colorbar.ColorbarBase(...) usage of add_lines(...) may yield missing lines/poorly adjusted lines. Code for reproduction import matplotlib.pyplot as plt import ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | e3reiter |
| 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