Title: Repeated calls to scatter with identical data produce different axis limits · Issue #15955 · matplotlib/matplotlib · GitHub
Open Graph Title: Repeated calls to scatter with identical data produce different axis limits · Issue #15955 · matplotlib/matplotlib
X Title: Repeated calls to scatter with identical data produce different axis limits · Issue #15955 · matplotlib/matplotlib
Description: Bug report Bug summary In trying to debug some tests, I discovered some strange behavior. I'm not certain it's a bug, but I can't really think of an explanation for it, so I'm reporting. Code for reproduction import numpy as np import ma...
Open Graph Description: Bug report Bug summary In trying to debug some tests, I discovered some strange behavior. I'm not certain it's a bug, but I can't really think of an explanation for it, so I'm reporting. Code for r...
X Description: Bug report Bug summary In trying to debug some tests, I discovered some strange behavior. I'm not certain it's a bug, but I can't really think of an explanation for it, so I'm repor...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/15955
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Repeated calls to scatter with identical data produce different axis limits","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nIn trying to debug some tests, I discovered some strange behavior. I'm not certain it's a bug, but I can't really think of an explanation for it, so I'm reporting.\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\nf, ax = plt.subplots()\r\nx, y = np.random.randn(2, 50)\r\nax.scatter(x, y)\r\nxlim = ax.get_xlim()\r\nax.scatter(x, y)\r\nprint(xlim == ax.get_xlim())\r\n```\r\n\r\n**Actual outcome**\r\n\r\n```\r\nFalse\r\n```\r\n\r\n**Expected outcome**\r\n\r\n```\r\nTrue\r\n```\r\n\r\n**Other observations**\r\n\r\nIt appears to be `scatter` dependent. If I replace both calls to `scatter` with `plot`, it passes. Calling `scatter` then `plot` passes, but calling `plot` then `scatter` fails.\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: MacOS\r\n * Matplotlib version: '3.1.1'\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): notebook inline, reproduces on Agg\r\n * Python version: 3.7\r\n","author":{"url":"https://github.com/mwaskom","@type":"Person","name":"mwaskom"},"datePublished":"2019-12-17T02:45:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/15955/matplotlib/issues/15955"}
| 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:4c99fc87-ae8e-c95f-db9c-aa16a3f7ce10 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DAC8:2BDEA4:1BD9:21C2:6A52B0C7 |
| html-safe-nonce | f13732c4173a53f8aaea04f034990ef256648cc037cadeb03bf322e4216945aa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUM4OjJCREVBNDoxQkQ5OjIxQzI6NkE1MkIwQzciLCJ2aXNpdG9yX2lkIjoiODIxNTAyMzAwMjk4MDYyNjYzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ba30049805ff8d4208cd38d78fcf975290ff7fdc033e94e36cfd6499d1535476 |
| hovercard-subject-tag | issue:538799294 |
| 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/15955/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7d32e5138c68ac317fd6ad6ac4791f945e789060065d49dfcc9be5bfe5b14546/matplotlib/matplotlib/issues/15955 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7d32e5138c68ac317fd6ad6ac4791f945e789060065d49dfcc9be5bfe5b14546/matplotlib/matplotlib/issues/15955 |
| og:image:alt | Bug report Bug summary In trying to debug some tests, I discovered some strange behavior. I'm not certain it's a bug, but I can't really think of an explanation for it, so I'm reporting. Code for r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mwaskom |
| 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