Title: scatter() does not accept gray strings anymore · Issue #12429 · matplotlib/matplotlib · GitHub
Open Graph Title: scatter() does not accept gray strings anymore · Issue #12429 · matplotlib/matplotlib
X Title: scatter() does not accept gray strings anymore · Issue #12429 · matplotlib/matplotlib
Description: Bug report Bug summary Passing a particula gray intensity as a string seems to be broken in matplotlib 3.0, at least for the scatter() function. This kind of argument format should (and was) possible according to documentation. Code for ...
Open Graph Description: Bug report Bug summary Passing a particula gray intensity as a string seems to be broken in matplotlib 3.0, at least for the scatter() function. This kind of argument format should (and was) possib...
X Description: Bug report Bug summary Passing a particula gray intensity as a string seems to be broken in matplotlib 3.0, at least for the scatter() function. This kind of argument format should (and was) possib...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12429
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"scatter() does not accept gray strings anymore","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nPassing a particula gray intensity as a string seems to be broken in matplotlib 3.0, at least for the scatter() function.\r\nThis kind of argument format should (and was) possible according to documentation.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nplt.scatter(np.arange(10), np.arange(10), c=\"0.5\")\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nIndexError Traceback (most recent call last)\r\n\u003cipython-input-99-426550bf20a7\u003e in \u003cmodule\u003e()\r\n----\u003e 1 plt.scatter(np.arange(10), np.arange(10), c=\"0.5\")\r\n\r\n~/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py in scatter(x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, data, **kwargs)\r\n 2791 x=x, y=y, s=s, c=c, marker=marker, cmap=cmap, norm=norm,\r\n 2792 vmin=vmin, vmax=vmax, alpha=alpha, linewidths=linewidths,\r\n-\u003e 2793 verts=verts, edgecolors=edgecolors, data=data, **kwargs)\r\n 2794 sci(__ret)\r\n 2795 return __ret\r\n\r\n~/anaconda3/lib/python3.6/site-packages/matplotlib/__init__.py in inner(ax, data, *args, **kwargs)\r\n 1783 \"the Matplotlib list!)\" % (label_namer, func.__name__),\r\n 1784 RuntimeWarning, stacklevel=2)\r\n-\u003e 1785 return func(ax, *args, **kwargs)\r\n 1786 \r\n 1787 inner.__doc__ = _add_data_doc(inner.__doc__,\r\n\r\n~/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_axes.py in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, **kwargs)\r\n 4187 try: # First, does 'c' look suitable for value-mapping?\r\n 4188 c_array = np.asanyarray(c, dtype=float)\r\n-\u003e 4189 n_elem = c_array.shape[0]\r\n 4190 if c_array.shape in xy_shape:\r\n 4191 c = np.ma.ravel(c_array)\r\n\r\nIndexError: tuple index out of range\r\n```\r\n\r\n**Expected outcome**\r\n same as:\r\n```python\r\nplt.scatter(np.arange(10), np.arange(10), c=(0.5,0.5,0.5))\r\n```\r\n\r\n**Matplotlib version**\r\n * Operating system: Linux\r\n * Matplotlib version: 3.0\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): notebook/inline\r\n * Python version: 3.6 (conda, default)\r\n\r\n\r\n","author":{"url":"https://github.com/gioelelm","@type":"Person","name":"gioelelm"},"datePublished":"2018-10-07T16:46:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/12429/matplotlib/issues/12429"}
| 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:fa14fa9f-ff08-1e69-a6a7-14f9a6ea79cd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DF2:152AD3:47A153:5F5F3F:6A55541C |
| html-safe-nonce | 9c98dfc08679654c3dd4f395e2290541af89baa5fc321b25a0591d772f806a69 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REYyOjE1MkFEMzo0N0ExNTM6NUY1RjNGOjZBNTU1NDFDIiwidmlzaXRvcl9pZCI6IjM3MTcxODIzOTg0NzMyNjIxMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 965db5a70b17c14c84495aaf461c5e5fd02a5c7f3f13c8aa9d900fd4f52adb39 |
| hovercard-subject-tag | issue:367571741 |
| 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/12429/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a2bce4d347e20159f7ff053bc46399fb1f537be1eb534ee4ea79b9a9002f4ec7/matplotlib/matplotlib/issues/12429 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a2bce4d347e20159f7ff053bc46399fb1f537be1eb534ee4ea79b9a9002f4ec7/matplotlib/matplotlib/issues/12429 |
| og:image:alt | Bug report Bug summary Passing a particula gray intensity as a string seems to be broken in matplotlib 3.0, at least for the scatter() function. This kind of argument format should (and was) possib... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gioelelm |
| hostname | github.com |
| expected-hostname | github.com |
| None | cd9eea424140838b22e9eabd53d92b5702617ddd6d76efcd3a37f08d44309ca5 |
| 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 | 3084b9f587e8f1e19803bbe0c77ac77ce3c99c5c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width