Title: Scatter3D: depthshade=False causes IndexError for Tkinter when plotting more than one point. · Issue #18037 · matplotlib/matplotlib · GitHub
Open Graph Title: Scatter3D: depthshade=False causes IndexError for Tkinter when plotting more than one point. · Issue #18037 · matplotlib/matplotlib
X Title: Scatter3D: depthshade=False causes IndexError for Tkinter when plotting more than one point. · Issue #18037 · matplotlib/matplotlib
Description: Bug report Bug summary Setting depthshade=False causes an IndexError for Tkinter when plotting more than one point. There are no errors when plotting one point. Code for reproduction fig = plt.figure() ax = fig.gca(projection="3d") ax.sc...
Open Graph Description: Bug report Bug summary Setting depthshade=False causes an IndexError for Tkinter when plotting more than one point. There are no errors when plotting one point. Code for reproduction fig = plt.figu...
X Description: Bug report Bug summary Setting depthshade=False causes an IndexError for Tkinter when plotting more than one point. There are no errors when plotting one point. Code for reproduction fig = plt.figu...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18037
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Scatter3D: depthshade=False causes IndexError for Tkinter when plotting more than one point.","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nSetting `depthshade=False` causes an IndexError for Tkinter when plotting more than one point. There are no errors when plotting one point.\r\n\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\n fig = plt.figure()\r\n ax = fig.gca(projection=\"3d\")\r\n ax.scatter([0,1], [0,1], [0,1], c=\"royalblue\", marker=\"o\",\r\n depthshade=False, s=60, label=\"H\")\r\n plt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\nI'll only post the first and last rows of the terminal, as the rest contains privacy sensitive information.\r\n\r\nFirst rows: \r\n```\r\nException in Tkinter callback\r\nTraceback (most recent call last):\r\n File \"/usr/lib/python3.6/tkinter/__init__.py\", line 1705, in __call__\r\n return self.func(*args)\r\n File \"/usr/lib/python3.6/tkinter/__init__.py\", line 749, in callit\r\n func(*args)\r\n...: line 253, in idle_draw\r\n self.draw()\r\n```\r\n\r\nLast rows: \r\n```\r\n.../venv/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py\", line 507, in do_3d_projection\r\n fcs = fcs[z_markers_idx]\r\nIndexError: index 1 is out of bounds for axis 0 with size 1\r\n```\r\n\r\n\r\n**Expected outcome**\r\n\r\nIt should just plot two points in a 3D space.\r\n\r\n\r\n**Matplotlib version**\r\n * Operating system: Ubuntu 18.04\r\n * Matplotlib version: 3.3.0\r\n * Matplotlib backend TkAgg:\r\n * Python version: 3.6.9\r\n * Jupyter version (if applicable): -\r\n * Other libraries: \r\n\r\nI recently upgraded Matplotlib via pip:\r\n\r\n```bash\r\npip install --upgrade matplotlib\r\n```\r\n\r\nAnd originally installed it with pip as well within a virtual environment created with python-venv. I tested the code above in an older virtual environment and no errors occur when using matplotlib version 3.2.2.\r\n\r\n","author":{"url":"https://github.com/okkevaneck","@type":"Person","name":"okkevaneck"},"datePublished":"2020-07-23T17:01:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/18037/matplotlib/issues/18037"}
| 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:2e544305-7509-6a2e-8c21-096f1a210cdd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB46:2B0738:206466B:2C887AC:6A539477 |
| html-safe-nonce | 32b5b1df44cbd5f148b0e71cdaa4f4a55351fbb6bd0d15e9bea79cff4d9e8ed8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjQ2OjJCMDczODoyMDY0NjZCOjJDODg3QUM6NkE1Mzk0NzciLCJ2aXNpdG9yX2lkIjoiNDQ5MDQ4ODYzNTg5MjkyOTY1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 32a67a72d09292cac396c8a1f214206b1d60a12e9e91992884c11b2fd6711be5 |
| hovercard-subject-tag | issue:664632506 |
| 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/18037/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9358fa17403d76ec8df1c7b5b9d2c66193d4b48e330119d4d0d92925354b65f2/matplotlib/matplotlib/issues/18037 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9358fa17403d76ec8df1c7b5b9d2c66193d4b48e330119d4d0d92925354b65f2/matplotlib/matplotlib/issues/18037 |
| og:image:alt | Bug report Bug summary Setting depthshade=False causes an IndexError for Tkinter when plotting more than one point. There are no errors when plotting one point. Code for reproduction fig = plt.figu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | okkevaneck |
| 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