Title: fill_between incorrect with log y-axis and value 0 · Issue #8623 · matplotlib/matplotlib · GitHub
Open Graph Title: fill_between incorrect with log y-axis and value 0 · Issue #8623 · matplotlib/matplotlib
X Title: fill_between incorrect with log y-axis and value 0 · Issue #8623 · matplotlib/matplotlib
Description: fill_between doesn't give the result I expect if using a log y-axis and having a value of 0 in the y1 array. Example: %matplotlib inline import numpy as np import matplotlib.pyplot as plt x = np.array([1, 2, 3, 4, 5]) y1 = np.array([9, 2...
Open Graph Description: fill_between doesn't give the result I expect if using a log y-axis and having a value of 0 in the y1 array. Example: %matplotlib inline import numpy as np import matplotlib.pyplot as plt x = np.ar...
X Description: fill_between doesn't give the result I expect if using a log y-axis and having a value of 0 in the y1 array. Example: %matplotlib inline import numpy as np import matplotlib.pyplot as plt x = n...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8623
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fill_between incorrect with log y-axis and value 0","articleBody":"fill_between doesn't give the result I expect if using a log y-axis and having a value of 0 in the y1 array.\r\n\r\nExample:\r\n\r\n```python\r\n%matplotlib inline\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\nx = np.array([1, 2, 3, 4, 5])\r\ny1 = np.array([9, 2, 8, 3, 0])\r\ny2 = np.array([10, 10, 10, 10, 10])\r\n\r\nplt.plot(x, y1, lw=3, color='green')\r\nplt.plot(x, y2, lw=3, color='red')\r\nplt.fill_between(x, y1, y2)\r\nplt.loglog()\r\n```\r\n\r\nActual outcome:\r\n\r\nThe polygon created by fill_between somehow connects the last and first point, resulting in a completely incorrect patch:\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\nI was expecting / hoping that the band would be filled correctly and simply clipped (i.e. the result I get when changing the last y1 value from 0 to e.g. 1e-10). In the plot, the blue fill should be between the red and green line.\r\n\r\n**Matplotlib version**\r\n\r\nThis is with Matplotlib 2.0.0.\r\n(on Macports, but I don't think that matters)","author":{"url":"https://github.com/cdeil","@type":"Person","name":"cdeil"},"datePublished":"2017-05-15T14:28:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/8623/matplotlib/issues/8623"}
| 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:1786060a-5b99-2dc6-3c3f-d0b5764f4693 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AECA:111866:155599:1C6A28:6A5162C4 |
| html-safe-nonce | f347afb5f3ba19962fdd9fc85108fa6a0ecc504b3bf6d1c4166153e2bddc4c6a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUNBOjExMTg2NjoxNTU1OTk6MUM2QTI4OjZBNTE2MkM0IiwidmlzaXRvcl9pZCI6IjY1OTE1Nzc3ODA4NzM0MjE1MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 509b94a79c367ef791aebd6408cfbef6137b0869e96f335ffa63f93b4300c3f7 |
| hovercard-subject-tag | issue:228733302 |
| 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/8623/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9c5e30ea6b8fca0191b4ed535569a7ce93dc0989cb9e6c641fda33cf1311c4d7/matplotlib/matplotlib/issues/8623 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9c5e30ea6b8fca0191b4ed535569a7ce93dc0989cb9e6c641fda33cf1311c4d7/matplotlib/matplotlib/issues/8623 |
| og:image:alt | fill_between doesn't give the result I expect if using a log y-axis and having a value of 0 in the y1 array. Example: %matplotlib inline import numpy as np import matplotlib.pyplot as plt x = np.ar... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cdeil |
| 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 | 2eeb434949a926fad21064b4d395a54759f7a0b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width