Title: Scatter plots with log scaling · Issue #15978 · matplotlib/matplotlib · GitHub
Open Graph Title: Scatter plots with log scaling · Issue #15978 · matplotlib/matplotlib
X Title: Scatter plots with log scaling · Issue #15978 · matplotlib/matplotlib
Description: When using plt.scatter with log-scaled axes, order of calls is important: if axes are set to log scale before plt.scatter is called, margins of the plot are huge: import matplotlib.pyplot as plt import numpy as np f, ax = plt.subplots() ...
Open Graph Description: When using plt.scatter with log-scaled axes, order of calls is important: if axes are set to log scale before plt.scatter is called, margins of the plot are huge: import matplotlib.pyplot as plt im...
X Description: When using plt.scatter with log-scaled axes, order of calls is important: if axes are set to log scale before plt.scatter is called, margins of the plot are huge: import matplotlib.pyplot as plt im...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/15978
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Scatter plots with log scaling","articleBody":"When using `plt.scatter` with log-scaled axes, order of calls is important: if axes are set to log scale before `plt.scatter` is called, margins of the plot are huge:\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nf, ax = plt.subplots()\r\nax.set_xscale('log')\r\nax.set_yscale('log')\r\nax.scatter(2**np.arange(10), 2**np.arange(10))\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n**Expected outcome**\r\nWhen `plt.scatter` is called before axes are set to log scale, it looks normal:\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nf, ax = plt.subplots()\r\nax.scatter(2**np.arange(10), 2**np.arange(10))\r\nax.set_xscale('log')\r\nax.set_yscale('log')\r\n```\r\n\r\n\r\n\r\n * Operating system: Ubuntu 18.04\r\n * Matplotlib version: 3.1.1\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): module://ipykernel.pylab.backend_inline\r\n * Python version: 3.8\r\n * Jupyter version (if applicable): Jupyter Lab 1.1.4\r\n\r\nIn some earlier version of matplotlib (or something else) it worked as expected with any order of calls, but now I am getting this problem.\r\n\r\n","author":{"url":"https://github.com/Phlya","@type":"Person","name":"Phlya"},"datePublished":"2019-12-19T17:17:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/15978/matplotlib/issues/15978"}
| 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:6efdcf42-7fcb-e262-2e31-1eb13466a781 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C34:3C82F7:9072CA:C1F375:6A52B0C6 |
| html-safe-nonce | f044f96b69d03eed0aba489a83eef8b9668fa740ac55b7fb8a39611301c92ec1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzM0OjNDODJGNzo5MDcyQ0E6QzFGMzc1OjZBNTJCMEM2IiwidmlzaXRvcl9pZCI6IjkwNzMxMjgyOTMwMDg1ODQ5MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 284be4bfbc1f9fef06a92415258956172fd26396d045c70303ebcc05a6fe2665 |
| hovercard-subject-tag | issue:540447123 |
| 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/15978/issue_layout |
| twitter:image | https://opengraph.githubassets.com/82198d7389becacc1733c208583723450c9d9649f8537168e5c8237f5dde565b/matplotlib/matplotlib/issues/15978 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/82198d7389becacc1733c208583723450c9d9649f8537168e5c8237f5dde565b/matplotlib/matplotlib/issues/15978 |
| og:image:alt | When using plt.scatter with log-scaled axes, order of calls is important: if axes are set to log scale before plt.scatter is called, margins of the plot are huge: import matplotlib.pyplot as plt im... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Phlya |
| 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