Title: [Bug]: ax.plot(x,y) disappears after changing y_scale · Issue #25124 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: ax.plot(x,y) disappears after changing y_scale · Issue #25124 · matplotlib/matplotlib
X Title: [Bug]: ax.plot(x,y) disappears after changing y_scale · Issue #25124 · matplotlib/matplotlib
Description: Bug summary The output of ax.plot(x,y) disappears while changing y_scale from 'log' (initial scale for the y axis) to 'linear'. Code for reproduction import numpy as np import matplotlib.pyplot as plt samples = np.random.normal(size = 10...
Open Graph Description: Bug summary The output of ax.plot(x,y) disappears while changing y_scale from 'log' (initial scale for the y axis) to 'linear'. Code for reproduction import numpy as np import matplotlib.pyplot as ...
X Description: Bug summary The output of ax.plot(x,y) disappears while changing y_scale from 'log' (initial scale for the y axis) to 'linear'. Code for reproduction import numpy as np import matpl...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/25124
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: ax.plot(x,y) disappears after changing y_scale","articleBody":"### Bug summary\n\nThe output of ax.plot(x,y) disappears while changing y_scale from 'log' (initial scale for the y axis) to 'linear'. \r\n\n\n### Code for reproduction\n\n```python\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\nsamples = np.random.normal(size = 1000)\r\nx = np.linspace(-5,5,1000)\r\nfig, ax = plt.subplots()\r\nax.hist(samples, log = True, density = True)\r\nax.plot(x, np.exp(-x**2/2)/np.sqrt(2*np.pi))\r\nfig.savefig('log.pdf')\r\nax.set_yscale('linear')\r\nfig.savefig('lin.pdf')\n```\n\n\n### Actual outcome\n\n[lin.pdf](https://github.com/matplotlib/matplotlib/files/10559533/lin.pdf)\r\n[log.pdf](https://github.com/matplotlib/matplotlib/files/10559534/log.pdf)\r\n\n\n### Expected outcome\n\n[lin.pdf](https://github.com/matplotlib/matplotlib/files/10559549/lin.pdf)\r\n[log.pdf](https://github.com/matplotlib/matplotlib/files/10559550/log.pdf)\r\n\n\n### Additional information\n\nThe expected outcome is generated with matplotlib==3.5.3 \r\nfill_between and hist are working fine.\n\n### Operating system\n\nMacOSX\n\n### Matplotlib Version\n\n3.6.3\n\n### Matplotlib Backend\n\nMacOSX\n\n### Python version\n\n3.9.13\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/sterinaldi","@type":"Person","name":"sterinaldi"},"datePublished":"2023-02-01T17:06:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/25124/matplotlib/issues/25124"}
| 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:6b8dc405-19ca-dff2-3867-cab18d55d23b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D89C:1A2FA1:A592FFA:A905CA6:6A50B132 |
| html-safe-nonce | 0b68561f42d1377ffdad738a3d4a02ddd7556a53d8ca25d72b7b5b4a94865c21 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODlDOjFBMkZBMTpBNTkyRkZBOkE5MDVDQTY6NkE1MEIxMzIiLCJ2aXNpdG9yX2lkIjoiOTA4NjcwMzIyMDA0NzI2MjAwMiIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | 63d9ad5126e3217275e7267b2844ed5707a9aecfd1e92acd54968c0cb9126d30 |
| hovercard-subject-tag | issue:1566484834 |
| 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/25124/issue_layout |
| twitter:image | https://opengraph.githubassets.com/be1746db69aac01c484ec4baa737b3b0a6643ad52175d0aa864493a500838001/matplotlib/matplotlib/issues/25124 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/be1746db69aac01c484ec4baa737b3b0a6643ad52175d0aa864493a500838001/matplotlib/matplotlib/issues/25124 |
| og:image:alt | Bug summary The output of ax.plot(x,y) disappears while changing y_scale from 'log' (initial scale for the y axis) to 'linear'. Code for reproduction import numpy as np import matplotlib.pyplot as ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sterinaldi |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| 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 | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width