Title: [Bug]: `add_collection3d` does not update view limits · Issue #23317 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: `add_collection3d` does not update view limits · Issue #23317 · matplotlib/matplotlib
X Title: [Bug]: `add_collection3d` does not update view limits · Issue #23317 · matplotlib/matplotlib
Description: Bug summary When creating a 3D plot using add_collection3d, the view limits are not automatically updated like in other plot functions. Possibly related to #14298. Code for reproduction import matplotlib.pyplot as plt import matplotlib.c...
Open Graph Description: Bug summary When creating a 3D plot using add_collection3d, the view limits are not automatically updated like in other plot functions. Possibly related to #14298. Code for reproduction import matp...
X Description: Bug summary When creating a 3D plot using add_collection3d, the view limits are not automatically updated like in other plot functions. Possibly related to #14298. Code for reproduction import matp...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23317
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: `add_collection3d` does not update view limits","articleBody":"### Bug summary\n\nWhen creating a 3D plot using `add_collection3d`, the view limits are not automatically updated like in other plot functions.\r\n\r\nPossibly related to #14298.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\nimport matplotlib.collections\r\nimport numpy as np\r\n\r\nfig, ax = plt.subplots(1, 1, figsize=(7, 4), constrained_layout=True, subplot_kw=dict(projection='3d', proj_type='ortho'))\r\nxy = np.array([[(0, 0), (0.5, 100), (1, 0)]])\r\nax.add_collection3d(matplotlib.collections.LineCollection(xy))\r\n# Manually update view limits\r\n# ax.auto_scale_xyz(xy[..., 0], xy[..., 1], None, ax.has_data())\r\nplt.show()\n```\n\n\n### Actual outcome\n\n\r\n\n\n### Expected outcome\n\nProduced by uncommenting the line of code below `# Manually update view limits`.\r\n\r\n\r\n\n\n### Additional information\n\nI'm using matplotlib 3.5.0, but the relevant code does not seem to call `auto_scale_xyz` like the other plot functions in the 3.5.2 branch or the main branch.\n\n### Operating system\n\nWindow 10\n\n### Matplotlib Version\n\n3.5.0\n\n### Matplotlib Backend\n\nmodule://matplotlib_inline.backend_inline\n\n### Python version\n\nPython 3.9.9\n\n### Jupyter version\n\n3.4.3\n\n### Installation\n\npip","author":{"url":"https://github.com/Qrox","@type":"Person","name":"Qrox"},"datePublished":"2022-06-21T10:50:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/23317/matplotlib/issues/23317"}
| 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:f73f0f5f-1e97-b9cc-c010-c50c585e1996 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE86:23D81D:9ABF3F:CCBAFA:6A531449 |
| html-safe-nonce | 54fc167986adace37bf7331f8d598c1b7ea5e471e08f79e1dc65aeff7b6eca42 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTg2OjIzRDgxRDo5QUJGM0Y6Q0NCQUZBOjZBNTMxNDQ5IiwidmlzaXRvcl9pZCI6IjQ4MjQ4NzE2Mzk2ODU3MzE0MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 56dcecf645b1e1b5f98fe024aa8c440be8627912a7a81132f1a8d243322ef913 |
| hovercard-subject-tag | issue:1278264167 |
| 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/23317/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d8741909daaf74bb1d6b2a981d286383cf296832eedb4b0dd16b0fb32561191a/matplotlib/matplotlib/issues/23317 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d8741909daaf74bb1d6b2a981d286383cf296832eedb4b0dd16b0fb32561191a/matplotlib/matplotlib/issues/23317 |
| og:image:alt | Bug summary When creating a 3D plot using add_collection3d, the view limits are not automatically updated like in other plot functions. Possibly related to #14298. Code for reproduction import matp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Qrox |
| 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