René's URL Explorer Experiment


Title: [Bug]: Markers can be integers, but numpy integers fail · Issue #30836 · matplotlib/matplotlib · GitHub

Open Graph Title: [Bug]: Markers can be integers, but numpy integers fail · Issue #30836 · matplotlib/matplotlib

X Title: [Bug]: Markers can be integers, but numpy integers fail · Issue #30836 · matplotlib/matplotlib

Description: Bug summary There are workflows where a sequence of markers could end up in a numpy array or a pandas series. If that sequence contains only integers, the marker values will become of type np.int64. It is therefore reasonable to expect t...

Open Graph Description: Bug summary There are workflows where a sequence of markers could end up in a numpy array or a pandas series. If that sequence contains only integers, the marker values will become of type np.int64...

X Description: Bug summary There are workflows where a sequence of markers could end up in a numpy array or a pandas series. If that sequence contains only integers, the marker values will become of type np.int64...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30836

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Markers can be integers, but numpy integers fail","articleBody":"### Bug summary\n\nThere are workflows where a sequence of markers could end up in a numpy array or a pandas series. If that sequence contains only integers, the marker values will become of type `np.int64`. It is therefore reasonable to expect that these values, different in type but equal to those in the input sequence, not lead to an error.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\nfrom matplotlib.markers import MarkerStyle\n\ncaretleft1 = [4][0]\ncaretleft2 = np.array([4])[0]\n\nassert caretleft1 in MarkerStyle.markers\nassert caretleft2 in MarkerStyle.markers\n\n# plt.plot([1, 2, 3], marker=caretleft1) # works\nplt.plot([1, 2, 3], marker=caretleft2) # fails\n```\n\n### Actual outcome\n\n```pytb\n---------------------------------------------------------------------------\nValueError                                Traceback (most recent call last)\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/markers.py:326, in MarkerStyle._set_marker(self, marker)\n    325 try:\n--\u003e 326     Path(marker)\n    327     self._marker_function = self._set_vertices\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/path.py:130, in Path.__init__(self, vertices, codes, _interpolation_steps, closed, readonly)\n    129 vertices = _to_unmasked_float_array(vertices)\n--\u003e 130 _api.check_shape((None, 2), vertices=vertices)\n    132 if codes is not None and len(vertices):\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/_api/__init__.py:162, in check_shape(shape, **kwargs)\n    160     text_shape += \",\"\n--\u003e 162 raise ValueError(\n    163     f\"{k!r} must be {len(shape)}D with shape ({text_shape}), \"\n    164     f\"but your input has shape {v.shape}\"\n    165 )\n\nValueError: 'vertices' must be 2D with shape (N, 2), but your input has shape ()\n\nThe above exception was the direct cause of the following exception:\n\nValueError                                Traceback (most recent call last)\nCell In[5], line 1\n----\u003e 1 plt.plot([1, 2, 3], marker=caretleft2)\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/pyplot.py:3838, in plot(scalex, scaley, data, *args, **kwargs)\n   3830 @_copy_docstring_and_deprecators(Axes.plot)\n   3831 def plot(\n   3832     *args: float | ArrayLike | str,\n   (...)   3836     **kwargs,\n   3837 ) -\u003e list[Line2D]:\n-\u003e 3838     return gca().plot(\n   3839         *args,\n   3840         scalex=scalex,\n   3841         scaley=scaley,\n   3842         **({\"data\": data} if data is not None else {}),\n   3843         **kwargs,\n   3844     )\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/axes/_axes.py:1777, in Axes.plot(self, scalex, scaley, data, *args, **kwargs)\n   1534 \"\"\"\n   1535 Plot y versus x as lines and/or markers.\n   1536 \n   (...)   1774 (``'green'``) or hex strings (``'#008000'``).\n   1775 \"\"\"\n   1776 kwargs = cbook.normalize_kwargs(kwargs, mlines.Line2D)\n-\u003e 1777 lines = [*self._get_lines(self, *args, data=data, **kwargs)]\n   1778 for line in lines:\n   1779     self.add_line(line)\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/axes/_base.py:297, in _process_plot_var_args.__call__(self, axes, data, return_kwargs, *args, **kwargs)\n    295     this += args[0],\n    296     args = args[1:]\n--\u003e 297 yield from self._plot_args(\n    298     axes, this, kwargs, ambiguous_fmt_datakey=ambiguous_fmt_datakey,\n    299     return_kwargs=return_kwargs\n    300 )\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/axes/_base.py:546, in _process_plot_var_args._plot_args(self, axes, tup, kwargs, return_kwargs, ambiguous_fmt_datakey)\n    544     return list(result)\n    545 else:\n--\u003e 546     return [l[0] for l in result]\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/axes/_base.py:539, in \u003cgenexpr\u003e(.0)\n    534 else:\n    535     raise ValueError(\n    536         f\"label must be scalar or have the same length as the input \"\n    537         f\"data, but found {len(label)} for {n_datasets} datasets.\")\n--\u003e 539 result = (make_artist(axes, x[:, j % ncx], y[:, j % ncy], kw,\n    540                       {**kwargs, 'label': label})\n    541           for j, label in enumerate(labels))\n    543 if return_kwargs:\n    544     return list(result)\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/axes/_base.py:338, in _process_plot_var_args._make_line(self, axes, x, y, kw, kwargs)\n    336 kw = {**kw, **kwargs}  # Don't modify the original kw.\n    337 self._setdefaults(self._getdefaults(kw), kw)\n--\u003e 338 seg = mlines.Line2D(x, y, **kw)\n    339 return seg, kw\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/lines.py:394, in Line2D.__init__(self, xdata, ydata, linewidth, linestyle, color, gapcolor, marker, markersize, markeredgewidth, markeredgecolor, markerfacecolor, markerfacecoloralt, fillstyle, antialiased, dash_capstyle, solid_capstyle, dash_joinstyle, solid_joinstyle, pickradius, drawstyle, markevery, **kwargs)\n    392     marker = 'none'  # Default.\n    393 if not isinstance(marker, MarkerStyle):\n--\u003e 394     self._marker = MarkerStyle(marker, fillstyle)\n    395 else:\n    396     self._marker = marker\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/markers.py:248, in MarkerStyle.__init__(self, marker, fillstyle, transform, capstyle, joinstyle)\n    246 self._user_joinstyle = JoinStyle(joinstyle) if joinstyle is not None else None\n    247 self._set_fillstyle(fillstyle)\n--\u003e 248 self._set_marker(marker)\n\nFile ~/abc/.venv/lib/python3.13/site-packages/matplotlib/markers.py:329, in MarkerStyle._set_marker(self, marker)\n    327         self._marker_function = self._set_vertices\n    328     except ValueError as err:\n--\u003e 329         raise ValueError(\n    330             f'Unrecognized marker style {marker!r}') from err\n    332 if not isinstance(marker, MarkerStyle):\n    333     self._marker = marker\n\nValueError: Unrecognized marker style np.int64(4)\n```\n\n### Expected outcome\n\n\u003cimg width=\"640\" height=\"480\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/54573c9e-6b6b-4651-a0a6-88213c399cdc\" /\u003e\n\n### Additional information\n\nI will submit a PR.\n\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n       import matplotlib; print(matplotlib.__version__) 3.10.3\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nNone","author":{"url":"https://github.com/has2k1","@type":"Person","name":"has2k1"},"datePublished":"2025-12-11T13:20:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/30836/matplotlib/issues/30836"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:afb58b3d-60b9-0b0a-468a-0c8c833e9d3d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD070:349CCC:19393BC:2256D07:6A523C3A
html-safe-nonce313c9df981d13bd0c1b09f81789ad6e7c5c1bc6327b869f2077a82264a3d8787
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDcwOjM0OUNDQzoxOTM5M0JDOjIyNTZEMDc6NkE1MjNDM0EiLCJ2aXNpdG9yX2lkIjoiNzA1ODczMzAxOTk0ODAwNjQ1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac228baea835f2f82defe1032cdc064599b5e99f7c547c0212fb388617f5b8ee25
hovercard-subject-tagissue:3719382401
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/30836/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e80345ffab0a881ffedd92e97e9c95df2f2df5ec7c5ca14466051584d42d48f4/matplotlib/matplotlib/issues/30836
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e80345ffab0a881ffedd92e97e9c95df2f2df5ec7c5ca14466051584d42d48f4/matplotlib/matplotlib/issues/30836
og:image:altBug summary There are workflows where a sequence of markers could end up in a numpy array or a pandas series. If that sequence contains only integers, the marker values will become of type np.int64...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehas2k1
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/30836/#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F30836%2F
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F30836%2F
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/30836/
Reloadhttps://github.com/matplotlib/matplotlib/issues/30836/
Reloadhttps://github.com/matplotlib/matplotlib/issues/30836/
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/30836/
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/30836/
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 409 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
#30838https://github.com/matplotlib/matplotlib/pull/30838
[Bug]: Markers can be integers, but numpy integers failhttps://github.com/matplotlib/matplotlib/issues/30836/#top
#30838https://github.com/matplotlib/matplotlib/pull/30838
third-party integration: pandashttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22third-party%20integration%3A%20pandas%22
v3.11.0https://github.com/matplotlib/matplotlib/milestone/96
https://github.com/has2k1
has2k1https://github.com/has2k1
on Dec 11, 2025https://github.com/matplotlib/matplotlib/issues/30836#issue-3719382401
https://private-user-images.githubusercontent.com/780341/525384442-54573c9e-6b6b-4651-a0a6-88213c399cdc.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM3NzQ1NjYsIm5iZiI6MTc4Mzc3NDI2NiwicGF0aCI6Ii83ODAzNDEvNTI1Mzg0NDQyLTU0NTczYzllLTZiNmItNDY1MS1hMGE2LTg4MjEzYzM5OWNkYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcxMVQxMjUxMDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wZGM0Y2FjMjdhM2JkYmVmOGJmYWI3ZjFjZGZhNTA5YTVkYzA0Yjk1Mzc3ZjUwYTU4M2ExZDkzNjBmYTJhNWI3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.Oum4TNpNVdSVF0rQI9_0x4KdZl5nTmnY6e3GFWSpHg4
third-party integration: pandashttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22third-party%20integration%3A%20pandas%22
v3.11.0https://github.com/matplotlib/matplotlib/milestone/96
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.