Title: Scatter autoscaling still has issues with log scaling and zero values · Issue #16552 · matplotlib/matplotlib · GitHub
Open Graph Title: Scatter autoscaling still has issues with log scaling and zero values · Issue #16552 · matplotlib/matplotlib
X Title: Scatter autoscaling still has issues with log scaling and zero values · Issue #16552 · matplotlib/matplotlib
Description: I installed the 3.2.0rc3 package, and I can confirm that this fixes almost all the issues with autoscaling and scatter. However, if you have points with 0 for the y-axis and enable log scaling there is still an issue with the scatter plo...
Open Graph Description: I installed the 3.2.0rc3 package, and I can confirm that this fixes almost all the issues with autoscaling and scatter. However, if you have points with 0 for the y-axis and enable log scaling ther...
X Description: I installed the 3.2.0rc3 package, and I can confirm that this fixes almost all the issues with autoscaling and scatter. However, if you have points with 0 for the y-axis and enable log scaling ther...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/16552
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Scatter autoscaling still has issues with log scaling and zero values","articleBody":"I installed the 3.2.0rc3 package, and I can confirm that this fixes almost all the issues with autoscaling and `scatter`. However, if you have points with 0 for the y-axis and enable log scaling there is still an issue with the scatter plot auto scaling (that doesn't show up with the standard `plot` function).\r\n\r\n```python\r\nimport itertools\r\n\r\nimport numpy as np\r\nfrom matplotlib import pyplot as plt\r\n\r\n\r\nx_vals = [4.38462e-06,\r\n 5.54929e-06,\r\n 7.02332e-06,\r\n 8.88889e-06,\r\n 1.125e-05,\r\n 1.42383e-05,\r\n 1.80203e-05,\r\n 2.2807e-05,\r\n 2.88651e-05,\r\n 3.65324e-05,\r\n 4.62363e-05,\r\n 5.85178e-05,\r\n 7.40616e-05,\r\n 9.37342e-05,\r\n 0.000118632,\r\n ]\r\n\r\ny_vals = [0.0,\r\n 0.10000000000000002,\r\n 0.182,\r\n 0.332,\r\n 0.604,\r\n 1.1,\r\n 2.0,\r\n 3.64,\r\n 6.64,\r\n 12.100000000000001,\r\n 22.0,\r\n 39.60000000000001,\r\n 71.3,\r\n ]\r\n\r\npts = np.array(list(itertools.product(x_vals, y_vals)))\r\n\r\nfig = plt.figure(\"Scatter plot\")\r\nax = fig.gca()\r\nax.set_xscale('log')\r\nax.set_yscale('log')\r\nax.scatter(pts[:,0], pts[:,1]) # This only shows four rows of points\r\n\r\nfig = plt.figure(\"Regular plot\")\r\nax = fig.gca()\r\nax.set_xscale('log')\r\nax.set_yscale('log')\r\nax.plot(pts[:,0], pts[:,1], marker=\"o\", ls=\"\") # This works\r\n\r\nplt.show()\r\n```\r\n\r\n_Originally posted by @moloney in https://github.com/matplotlib/matplotlib/issues/6015#issuecomment-586488762_","author":{"url":"https://github.com/moloney","@type":"Person","name":"moloney"},"datePublished":"2020-02-18T19:51:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/16552/matplotlib/issues/16552"}
| 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:d8c2f5cf-da0e-9918-1a48-54bd4281d410 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC44:BC138:A001E8:DCEDAA:6A513292 |
| html-safe-nonce | b7f2bb92aed53530e7e47eae59f7330d1db7685ff7a6c3532eaa4c15fafcf025 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzQ0OkJDMTM4OkEwMDFFODpEQ0VEQUE6NkE1MTMyOTIiLCJ2aXNpdG9yX2lkIjoiNDgwOTA4NzgxOTU1NjQwMTgxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8e79944a51142414f10591945270920d3207df1818537b9d5d7afa763aa2a59d |
| hovercard-subject-tag | issue:567120339 |
| 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/16552/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a443efaa3afc74607de6f40bcb68b890fafaa9b830aaef5956a14e69a36f2314/matplotlib/matplotlib/issues/16552 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a443efaa3afc74607de6f40bcb68b890fafaa9b830aaef5956a14e69a36f2314/matplotlib/matplotlib/issues/16552 |
| og:image:alt | I installed the 3.2.0rc3 package, and I can confirm that this fixes almost all the issues with autoscaling and scatter. However, if you have points with 0 for the y-axis and enable log scaling ther... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | moloney |
| hostname | github.com |
| expected-hostname | github.com |
| None | e840f405b2718e8f2d55aafa9ff27dbce17e29d0c253011d05ea0fea3c78baff |
| 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 | 4ae6027e8ba70c79dc08249bb6cdc1a09d788496 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width