Title: Histograms disappear with logarithmic y-axis · Issue #9288 · matplotlib/matplotlib · GitHub
Open Graph Title: Histograms disappear with logarithmic y-axis · Issue #9288 · matplotlib/matplotlib
X Title: Histograms disappear with logarithmic y-axis · Issue #9288 · matplotlib/matplotlib
Description: Bug report Bug summary Setting a logarithmic y-axis with ax.set_yscale('log') causes histograms to disappear from the axis. This occurs in 2.1.0 but not in 2.0.2. Code for reproduction import matplotlib matplotlib.use('Agg') import matpl...
Open Graph Description: Bug report Bug summary Setting a logarithmic y-axis with ax.set_yscale('log') causes histograms to disappear from the axis. This occurs in 2.1.0 but not in 2.0.2. Code for reproduction import matpl...
X Description: Bug report Bug summary Setting a logarithmic y-axis with ax.set_yscale('log') causes histograms to disappear from the axis. This occurs in 2.1.0 but not in 2.0.2. Code for reproduction impo...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/9288
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Histograms disappear with logarithmic y-axis","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\nSetting a logarithmic y-axis with `ax.set_yscale('log')` causes histograms to disappear from the axis. This occurs in [2.1.0](https://github.com/matplotlib/matplotlib/releases/tag/v2.1.0) but not in 2.0.2.\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\r\nmatplotlib.use('Agg')\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nxs = np.random.normal(size=int(1e6))\r\nfig, (ax1, ax2) = plt.subplots(1, 2)\r\nax1.hist(xs, range=(-5, 5), bins=100)\r\nax2.hist(xs, range=(-5, 5), bins=100)\r\nax2.set_ylim(ymin=1)\r\nax2.set_yscale('log')\r\nfig.savefig('histogram.png')\r\n```\r\n\r\n**Actual outcome**\r\n\r\nWith **2.1.0**:\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\nI expect to see a logarithm y-axis _and_ the histogram, but I only see the former. With **2.0.2** I see this:\r\n\r\n","author":{"url":"https://github.com/alexpearce","@type":"Person","name":"alexpearce"},"datePublished":"2017-10-05T20:08:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/9288/matplotlib/issues/9288"}
| 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:da4e6944-0452-ce93-56a2-2c0dd92dc372 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA32:16A191:116CDBC:17B3EE9:6A521324 |
| html-safe-nonce | c56b8915fe9c0332deda5986da2c8da3f424a4a6adcbb1c5bd084d34c9dfe73f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTMyOjE2QTE5MToxMTZDREJDOjE3QjNFRTk6NkE1MjEzMjQiLCJ2aXNpdG9yX2lkIjoiMzA0NjIzMjg1MDk4ODkyOTgyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6bdf551617b955f7c9104555e8d8f8455961b22194300a09c901105e6cb650eb |
| hovercard-subject-tag | issue:263250239 |
| 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/9288/issue_layout |
| twitter:image | https://opengraph.githubassets.com/29dd8681d20bf8d910a24465d8966e1db694305528ae5b1dbe9dd872de06dcd1/matplotlib/matplotlib/issues/9288 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/29dd8681d20bf8d910a24465d8966e1db694305528ae5b1dbe9dd872de06dcd1/matplotlib/matplotlib/issues/9288 |
| og:image:alt | Bug report Bug summary Setting a logarithmic y-axis with ax.set_yscale('log') causes histograms to disappear from the axis. This occurs in 2.1.0 but not in 2.0.2. Code for reproduction import matpl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alexpearce |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width