Title: Trying to set_ylim(bottom=0) on a log scaled axis changes plot · Issue #7733 · matplotlib/matplotlib · GitHub
Open Graph Title: Trying to set_ylim(bottom=0) on a log scaled axis changes plot · Issue #7733 · matplotlib/matplotlib
X Title: Trying to set_ylim(bottom=0) on a log scaled axis changes plot · Issue #7733 · matplotlib/matplotlib
Description: import matplotlib.pyplot as plt fig, axs = plt.subplots(2, 1) axs[0].scatter(range(0, 4), [0, 1, 2, 3]) axs[1].scatter(range(0, 4), [0, 1, 2, 3]) axs[0].set_yscale('log') axs[1].set_yscale('log') axs[1].set_ylim(bottom=0) plt.show() This...
Open Graph Description: import matplotlib.pyplot as plt fig, axs = plt.subplots(2, 1) axs[0].scatter(range(0, 4), [0, 1, 2, 3]) axs[1].scatter(range(0, 4), [0, 1, 2, 3]) axs[0].set_yscale('log') axs[1].set_yscale('log') a...
X Description: import matplotlib.pyplot as plt fig, axs = plt.subplots(2, 1) axs[0].scatter(range(0, 4), [0, 1, 2, 3]) axs[1].scatter(range(0, 4), [0, 1, 2, 3]) axs[0].set_yscale('log') axs[1].set_yscale(...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7733
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Trying to set_ylim(bottom=0) on a log scaled axis changes plot","articleBody":"```python\r\nimport matplotlib.pyplot as plt\r\n\r\nfig, axs = plt.subplots(2, 1)\r\n\r\naxs[0].scatter(range(0, 4), [0, 1, 2, 3])\r\naxs[1].scatter(range(0, 4), [0, 1, 2, 3])\r\n\r\naxs[0].set_yscale('log')\r\naxs[1].set_yscale('log')\r\n\r\naxs[1].set_ylim(bottom=0)\r\n\r\nplt.show()\r\n```\r\n\r\nThis raises\r\n```\r\n/home/dstansby/matplotlib/lib/matplotlib/axes/_base.py:3174: UserWarning: Attempted to set non-positive ylimits for log-scale axis; invalid limits will be ignored.\r\n 'Attempted to set non-positive ylimits for log-scale axis; '\r\n```\r\n\r\nHowever, the 2nd plot *is* changed by the `set_ylim(bottom=0)` call, and no data is visible.\r\n\r\n\r\n\r\nThis is present on master. ","author":{"url":"https://github.com/dstansby","@type":"Person","name":"dstansby"},"datePublished":"2017-01-03T12:42:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/7733/matplotlib/issues/7733"}
| 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:b3cd8b12-7ba3-fc19-44e4-652e3d90a2cd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E89A:290D1F:C07607:10341F2:6A53213A |
| html-safe-nonce | 806c153bc484b6b1aa890a467a3f126b33c47d150b74f0d4272e0ccde0e999dc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODlBOjI5MEQxRjpDMDc2MDc6MTAzNDFGMjo2QTUzMjEzQSIsInZpc2l0b3JfaWQiOiIyODE2Nzg1MTM2NzEyMDk4MTA2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8b18aa0ac070326333d9c0d7cd88f914388a17e64adbe039b8af73ee11b4786b |
| hovercard-subject-tag | issue:198466832 |
| 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/7733/issue_layout |
| twitter:image | https://opengraph.githubassets.com/497e6d6f7d8b42201266108c00bf55e659e4e3277ac5b3aa7a4a72065d0d71f8/matplotlib/matplotlib/issues/7733 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/497e6d6f7d8b42201266108c00bf55e659e4e3277ac5b3aa7a4a72065d0d71f8/matplotlib/matplotlib/issues/7733 |
| og:image:alt | import matplotlib.pyplot as plt fig, axs = plt.subplots(2, 1) axs[0].scatter(range(0, 4), [0, 1, 2, 3]) axs[1].scatter(range(0, 4), [0, 1, 2, 3]) axs[0].set_yscale('log') axs[1].set_yscale('log') a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dstansby |
| 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