Title: incorrect default limits 'log' scale depending on order of scatter · Issue #11198 · matplotlib/matplotlib · GitHub
Open Graph Title: incorrect default limits 'log' scale depending on order of scatter · Issue #11198 · matplotlib/matplotlib
X Title: incorrect default limits 'log' scale depending on order of scatter · Issue #11198 · matplotlib/matplotlib
Description: Bug report Bug summary After setting scale to 'log' the default limits can cut off datapoints depending on the order of plotting. Note: calling set_xscale/set_yscale before calling scatter does not reproduce this bug. Code for reproducti...
Open Graph Description: Bug report Bug summary After setting scale to 'log' the default limits can cut off datapoints depending on the order of plotting. Note: calling set_xscale/set_yscale before calling scatter does not...
X Description: Bug report Bug summary After setting scale to 'log' the default limits can cut off datapoints depending on the order of plotting. Note: calling set_xscale/set_yscale before calling scatter ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/11198
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"incorrect default limits 'log' scale depending on order of scatter","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nAfter setting scale to `'log'` the default limits can cut off datapoints depending on the order of plotting.\r\n\r\nNote: calling `set_xscale`/`set_yscale` before calling `scatter` does not reproduce this bug.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\n# smallest span\r\nx1 = np.array([1, 10])\r\ny1 = np.array([10, 1])\r\n\r\n# largest span\r\nx2 = np.array([0.1, 100])\r\ny2 = np.array([100, 0.1])\r\n\r\nfig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2,2, figsize=(8,8))\r\n\r\nax1.scatter(x1, y1)\r\nax1.scatter(x2, y2)\r\nax1.set_title('linear; smallest span first', color='g')\r\n\r\nax2.scatter(x1, y1)\r\nax2.scatter(x2, y2)\r\nax2.set_xscale('log')\r\nax2.set_yscale('log')\r\nax2.set_title('log; smallest span first', color='r')\r\n\r\nax3.scatter(x2, y2)\r\nax3.scatter(x1, y1)\r\nax3.set_title('linear; largest span first', color='g')\r\n\r\nax4.scatter(x2, y2)\r\nax4.scatter(x1, y1)\r\nax4.set_xscale('log')\r\nax4.set_yscale('log')\r\nax4.set_title('log; largest span first', color='g')\r\n```\r\n\r\n**Outcome**\r\n\r\n\r\n\r\n**Matplotlib version**\r\n * Matplotlib version: `2.2.2`\r\n * Matplotlib backend: `MacOSX`\r\n * Python version: `2.7.14` and `3.6.4`","author":{"url":"https://github.com/lboogaard","@type":"Person","name":"lboogaard"},"datePublished":"2018-05-08T12:11:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/11198/matplotlib/issues/11198"}
| 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:0977b0d8-0b39-c5c8-7030-e6eb6c95021f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 919A:F8982:25F8C2D:33D9DD9:6A53A901 |
| html-safe-nonce | 8871230bfadb361a7ec073a96224116c96d94a9bdc465c5c0968d2bfd44e093c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTlBOkY4OTgyOjI1RjhDMkQ6MzNEOUREOTo2QTUzQTkwMSIsInZpc2l0b3JfaWQiOiI3NTc0NzkwMzQ0MzM4MDI0NzA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | dc05e6a07f1579dfcba3cb205e11a715f686365c6ddac2091978ecd0f8e46e39 |
| hovercard-subject-tag | issue:321160255 |
| 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/11198/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0d94aceab895229e5020ac854dcfc24482f4835f266d6a3393c3c63d857e4400/matplotlib/matplotlib/issues/11198 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0d94aceab895229e5020ac854dcfc24482f4835f266d6a3393c3c63d857e4400/matplotlib/matplotlib/issues/11198 |
| og:image:alt | Bug report Bug summary After setting scale to 'log' the default limits can cut off datapoints depending on the order of plotting. Note: calling set_xscale/set_yscale before calling scatter does not... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lboogaard |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width