René's URL Explorer Experiment


Title: [BUG] Warn when legend() receives mismatched handles and labels in 2-argument positional form by EncryptedDoom · Pull Request #31315 · matplotlib/matplotlib · GitHub

Open Graph Title: [BUG] Warn when legend() receives mismatched handles and labels in 2-argument positional form by EncryptedDoom · Pull Request #31315 · matplotlib/matplotlib

X Title: [BUG] Warn when legend() receives mismatched handles and labels in 2-argument positional form by EncryptedDoom · Pull Request #31315 · matplotlib/matplotlib

Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.

Open Graph Description: PR Summary Closes #24050 Why is this change necessary? When calling ax.legend() using the 2-argument positional form — ax.legend(handles, labels) — with mismatched list lengths, matplotlib silently...

X Description: PR Summary Closes #24050 Why is this change necessary? When calling ax.legend() using the 2-argument positional form — ax.legend(handles, labels) — with mismatched list lengths, matplotlib silently...

Opengraph URL: https://github.com/matplotlib/matplotlib/pull/31315

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:024eac65-0287-591d-2986-aaf4f3b57e0e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCD34:364989:4F562:69C6D:6A52D3BA
html-safe-nonceac00af37ea26374159bfa90ae305add328b7e10c3e13b34642dcf94e9cc5dc48
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDM0OjM2NDk4OTo0RjU2Mjo2OUM2RDo2QTUyRDNCQSIsInZpc2l0b3JfaWQiOiI0MTM2MjU3MjA5NTQwNzI3NzM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac77619d139e9dddac5bece25d65f3ac338274f4e64153c898ad076adfeb28d0be
hovercard-subject-tagpull_request:3404611643
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/31315/commits
twitter:imagehttps://opengraph.githubassets.com/544edcc8fc6ba224373e53621903b07280fb5167cbf21a7308d6937471e339e6/matplotlib/matplotlib/pull/31315
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/544edcc8fc6ba224373e53621903b07280fb5167cbf21a7308d6937471e339e6/matplotlib/matplotlib/pull/31315
og:image:altPR Summary Closes #24050 Why is this change necessary? When calling ax.legend() using the 2-argument positional form — ax.legend(handles, labels) — with mismatched list lengths, matplotlib silently...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameEncryptedDoom
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-cache
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
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/pull/31315/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F31315%2Fcommits
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%2Fpull%2F31315%2Fcommits
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%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/pull/31315/commits
Reloadhttps://github.com/matplotlib/matplotlib/pull/31315/commits
Reloadhttps://github.com/matplotlib/matplotlib/pull/31315/commits
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/31315/commits
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/31315/commits
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 408 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
rcomerhttps://github.com/rcomer
matplotlib:mainhttps://github.com/matplotlib/matplotlib/tree/main
Conversationhttps://github.com/matplotlib/matplotlib/pull/31315
Commits15 (15)https://github.com/matplotlib/matplotlib/pull/31315/commits
Checkshttps://github.com/matplotlib/matplotlib/pull/31315/checks
Files changedhttps://github.com/matplotlib/matplotlib/pull/31315/files
[BUG] Warn when legend() receives mismatched handles and labels in 2-argument positional formhttps://github.com/matplotlib/matplotlib/pull/31315/commits#top
rcomerhttps://github.com/rcomer
matplotlib:mainhttps://github.com/matplotlib/matplotlib/tree/main
Implement warning for mismatched legend handles and labelshttps://github.com/matplotlib/matplotlib/pull/31315/commits/6ddad0a7d3cefad94a20bfc11dc95496ab651396
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
6ddad0ahttps://github.com/matplotlib/matplotlib/pull/31315/commits/6ddad0a7d3cefad94a20bfc11dc95496ab651396
https://github.com/matplotlib/matplotlib/tree/6ddad0a7d3cefad94a20bfc11dc95496ab651396
Add regression test for legend argument mismatchhttps://github.com/matplotlib/matplotlib/pull/31315/commits/f6c86c406c9b63f7f43a7e14cfad0de2c8a7d3ce
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
f6c86c4https://github.com/matplotlib/matplotlib/pull/31315/commits/f6c86c406c9b63f7f43a7e14cfad0de2c8a7d3ce
https://github.com/matplotlib/matplotlib/tree/f6c86c406c9b63f7f43a7e14cfad0de2c8a7d3ce
Fix regression test message for legend mismatchhttps://github.com/matplotlib/matplotlib/pull/31315/commits/11fd39a7d6d063d106c1352671abc4b1be7f3f62
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
11fd39ahttps://github.com/matplotlib/matplotlib/pull/31315/commits/11fd39a7d6d063d106c1352671abc4b1be7f3f62
https://github.com/matplotlib/matplotlib/tree/11fd39a7d6d063d106c1352671abc4b1be7f3f62
Fix indentation for test_legend_mismatched_positional_argshttps://github.com/matplotlib/matplotlib/pull/31315/commits/36c98c193e2e27209907737f92318d53663da105
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
36c98c1https://github.com/matplotlib/matplotlib/pull/31315/commits/36c98c193e2e27209907737f92318d53663da105
https://github.com/matplotlib/matplotlib/tree/36c98c193e2e27209907737f92318d53663da105
Update lib/matplotlib/legend.pyhttps://github.com/matplotlib/matplotlib/pull/31315/commits/741c82bba1ee91ecbcd1f2840634b6fdf55e6c90
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
timhoffmhttps://github.com/matplotlib/matplotlib/commits?author=timhoffm
741c82bhttps://github.com/matplotlib/matplotlib/pull/31315/commits/741c82bba1ee91ecbcd1f2840634b6fdf55e6c90
https://github.com/matplotlib/matplotlib/tree/741c82bba1ee91ecbcd1f2840634b6fdf55e6c90
Rename test for legend mismatched argumentshttps://github.com/matplotlib/matplotlib/pull/31315/commits/8a4de9e66d30fd70eedaec93193684603ee54b59
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
8a4de9ehttps://github.com/matplotlib/matplotlib/pull/31315/commits/8a4de9e66d30fd70eedaec93193684603ee54b59
https://github.com/matplotlib/matplotlib/tree/8a4de9e66d30fd70eedaec93193684603ee54b59
Update lib/matplotlib/tests/test_legend.pyhttps://github.com/matplotlib/matplotlib/pull/31315/commits/b4fd2c1bbba0344aa4c04b255311c584892210a0
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
timhoffmhttps://github.com/matplotlib/matplotlib/commits?author=timhoffm
b4fd2c1https://github.com/matplotlib/matplotlib/pull/31315/commits/b4fd2c1bbba0344aa4c04b255311c584892210a0
https://github.com/matplotlib/matplotlib/tree/b4fd2c1bbba0344aa4c04b255311c584892210a0
Implement warning test for legend handle-label mismatchhttps://github.com/matplotlib/matplotlib/pull/31315/commits/d1cf688dd4e56234777246317e893b8ffb42b1da
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
d1cf688https://github.com/matplotlib/matplotlib/pull/31315/commits/d1cf688dd4e56234777246317e893b8ffb42b1da
https://github.com/matplotlib/matplotlib/tree/d1cf688dd4e56234777246317e893b8ffb42b1da
Add test for legend position argument handlinghttps://github.com/matplotlib/matplotlib/pull/31315/commits/a6eaea528c5af191c6ef69109940bc5a98a25081
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
a6eaea5https://github.com/matplotlib/matplotlib/pull/31315/commits/a6eaea528c5af191c6ef69109940bc5a98a25081
https://github.com/matplotlib/matplotlib/tree/a6eaea528c5af191c6ef69109940bc5a98a25081
Update warning message for legend handle mismatchhttps://github.com/matplotlib/matplotlib/pull/31315/commits/94a97adcd2544b56ba7614e5c35f3a6f6d30270c
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
94a97adhttps://github.com/matplotlib/matplotlib/pull/31315/commits/94a97adcd2544b56ba7614e5c35f3a6f6d30270c
https://github.com/matplotlib/matplotlib/tree/94a97adcd2544b56ba7614e5c35f3a6f6d30270c
Fix legend creation with list of labelshttps://github.com/matplotlib/matplotlib/pull/31315/commits/7ecee3cb61fbeb0ec3797d1eac129211869fbf9f
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
7ecee3chttps://github.com/matplotlib/matplotlib/pull/31315/commits/7ecee3cb61fbeb0ec3797d1eac129211869fbf9f
https://github.com/matplotlib/matplotlib/tree/7ecee3cb61fbeb0ec3797d1eac129211869fbf9f
Merge branch 'matplotlib:main' into mainhttps://github.com/matplotlib/matplotlib/pull/31315/commits/b00fb58c648b197ef08afca66f82b645edbf1fc7
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
b00fb58https://github.com/matplotlib/matplotlib/pull/31315/commits/b00fb58c648b197ef08afca66f82b645edbf1fc7
https://github.com/matplotlib/matplotlib/tree/b00fb58c648b197ef08afca66f82b645edbf1fc7
gracefully handle generators in mismatch warninghttps://github.com/matplotlib/matplotlib/pull/31315/commits/b66aed1c8fe4e98eaa6210ff6cc06a2d04dcee28
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
b66aed1https://github.com/matplotlib/matplotlib/pull/31315/commits/b66aed1c8fe4e98eaa6210ff6cc06a2d04dcee28
https://github.com/matplotlib/matplotlib/tree/b66aed1c8fe4e98eaa6210ff6cc06a2d04dcee28
Update warning message for legend handle mismatchhttps://github.com/matplotlib/matplotlib/pull/31315/commits/a70436f4eb74d2b3369136eb8ae304810c9b9a07
https://github.com/EncryptedDoom
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
a70436fhttps://github.com/matplotlib/matplotlib/pull/31315/commits/a70436f4eb74d2b3369136eb8ae304810c9b9a07
https://github.com/matplotlib/matplotlib/tree/a70436f4eb74d2b3369136eb8ae304810c9b9a07
Update lib/matplotlib/legend.pyhttps://github.com/matplotlib/matplotlib/pull/31315/commits/8aa5415a9f8ea50da91c06bede0e83930295930b
EncryptedDoomhttps://github.com/matplotlib/matplotlib/commits?author=EncryptedDoom
timhoffmhttps://github.com/matplotlib/matplotlib/commits?author=timhoffm
8aa5415https://github.com/matplotlib/matplotlib/pull/31315/commits/8aa5415a9f8ea50da91c06bede0e83930295930b
https://github.com/matplotlib/matplotlib/tree/8aa5415a9f8ea50da91c06bede0e83930295930b
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.