René's URL Explorer Experiment


Title: Fix errobar order by cosama · Pull Request #17231 · matplotlib/matplotlib · GitHub

Open Graph Title: Fix errobar order by cosama · Pull Request #17231 · matplotlib/matplotlib

X Title: Fix errobar order by cosama · Pull Request #17231 · matplotlib/matplotlib

Description: PR Summary Closes #1622 #17139 This pull request fixes inconsistent behaviors of errorbar and the order they are drawn with respect to other elements. They way this is done, is to change how the vertical and horizontal columns of errorbar are plot. So far a LineCollection was used. Unfortunately, the only way to have a collection being drawn before Lines2D is to change the zorder, which let to weird behavior as well, when other objects are supposed to be plot above the error bars. The proper way to fix this would be to fix the internals of how collections and lines are stored and ordered as mentioned by @tacaswell in #1622 (comment). As the proper fix is a major rework of matplotlib and probably not possible in the foreseeable future, I suggest an easier fix here: The vertical and horizontal bars are drawn with Line2Ds. The only issue this causes it that the call to errobar now returns a list of Line2D while so far a LineCollection was returned. It would be even possible to add the errorbar caps directly to these new Line2D making errorbars more flexible and less argument parsing necessary, but that would have created even more changes, so I kept it simple for now (let me know if that is something you think is worth it). The implementation should pass all tests, I had to change a few tests, where the test checked inconsistent behavior/wrong images caused by the old implementation. Don't think this is a API change that can be made easily backward-compatible, or where a deprecation warning could be used, I'm open to suggestions how to resolve this. For sure might cause some issues of packages that depend on the correct return type. However, unless someone else has a good idea how this can be fixed, I think the benefits outweigh the drawbacks for now. PR Checklist Has Pytest style unit tests Code is Flake 8 compliant New features are documented, with examples if plot related Documentation is sphinx and numpydoc compliant Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Open Graph Description: PR Summary Closes #1622 #17139 This pull request fixes inconsistent behaviors of errorbar and the order they are drawn with respect to other elements. They way this is done, is to change how the ve...

X Description: PR Summary Closes #1622 #17139 This pull request fixes inconsistent behaviors of errorbar and the order they are drawn with respect to other elements. They way this is done, is to change how the ve...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0eae77fa-0816-ae47-fce2-ec1b40fc9f81
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9B7E:39D6FF:5CDF34:7C1093:6A52FCAA
html-safe-nonce0507f548d62221a26e4b30b7d1d7fb55a279758bd4dd53052bb9de0abb2aab7f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjdFOjM5RDZGRjo1Q0RGMzQ6N0MxMDkzOjZBNTJGQ0FBIiwidmlzaXRvcl9pZCI6IjIwNDgzNjE4MzA0MzEyNTk4MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac59459c3e25c522df8ca7553fcd9208361099494964594bc92b9f9324e7771c0a
hovercard-subject-tagpull_request:408214740
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/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/17231/files
twitter:imagehttps://avatars.githubusercontent.com/u/7439971?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/7439971?s=400&v=4
og:image:altPR Summary Closes #1622 #17139 This pull request fixes inconsistent behaviors of errorbar and the order they are drawn with respect to other elements. They way this is done, is to change how the ve...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
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/17231/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F17231%2Ffiles
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%2F17231%2Ffiles
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%2Ffiles&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/pull/17231/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/17231/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/17231/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/17231/files
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/17231/files
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
Sign up for GitHub https://github.com/signup?return_to=%2Fmatplotlib%2Fmatplotlib%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib%2Fissues%2Fnew%2Fchoose
cosamahttps://github.com/cosama
matplotlib:masterhttps://github.com/matplotlib/matplotlib/tree/master
cosama:fix-errobar-orderhttps://github.com/cosama/matplotlib/tree/fix-errobar-order
Conversation 9 https://github.com/matplotlib/matplotlib/pull/17231
Commits 12 https://github.com/matplotlib/matplotlib/pull/17231/commits
Checks 0 https://github.com/matplotlib/matplotlib/pull/17231/checks
Files changed https://github.com/matplotlib/matplotlib/pull/17231/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/17231/files
Fix errobar order https://github.com/matplotlib/matplotlib/pull/17231/files#top
Show all changes 12 commits https://github.com/matplotlib/matplotlib/pull/17231/files
5415638 Apply patch for errorbar order and add additional test cosama Apr 22, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/541563848a0a3dc728ff51bfd3215d923df847fb
2e54004 Draw error bar columns as Lines2D cosama Apr 22, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/2e54004e39363359235aee22c2a14a4f2b1cee58
2831a37 Fix wrong order of caps and barcols in errorbars cosama Apr 22, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/2831a37a2601f96a58606c1b43d44e611e830eb7
fa83af8 Remove unnecessary 'zorder' on errorbar cosama Apr 22, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/fa83af8ff629966b4e3849954fdd0ca8dd965d25
429fc19 Change capstyle of eb lines, add empty line if no errorbars are plot cosama Apr 23, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/429fc19a439ddc4c9d094b0da8aeae14a676d71b
75e3935 Fixed legend to work with errobars as lines, fixed tests cosama Apr 23, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/75e3935d363c65c29ab07021da4f4e44b6dda502
f695138 Remove TODO from previous commit cosama Apr 23, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/f695138f6bd89b7aa76527b6d81729e7791bbf72
f549102 Changed docstring for errorbar to reflect changes cosama Apr 23, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/f549102219c134e2b5ed282b59443ae166060698
1956f34 Add new fancy.svg compliant with new errorbar order cosama Apr 23, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/1956f34cf44a53f84b1c83aec2d540a63a6ae068
b279e54 Added Line2DWithErrorbars cosama Apr 25, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/b279e54aa823fdc875e0a0cf05fde623e7893936
7bdb1ff Fixed formatting cosama Apr 25, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/7bdb1ff78ba3abed172a50abd6f1f0783aa56974
ae22f3d Better docstrings, add Line2DWithErrorbars to doc/api/lines_api.rst cosama Apr 27, 2020 https://github.com/matplotlib/matplotlib/pull/17231/commits/ae22f3d55b0891da5d58ad28fca229e1ed7437ba
Clear filters https://github.com/matplotlib/matplotlib/pull/17231/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/17231/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/17231/files
lines_api.rst https://github.com/matplotlib/matplotlib/pull/17231/files#diff-c36934cc92e95fef72174075080b52bbd39b2680d7f2db52865680dc969c2b2c
_axes.py https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
lines.py https://github.com/matplotlib/matplotlib/pull/17231/files#diff-be677869a88f58790f2387fb2ac0ae12e2e9610d7c7096e25d3087d5ed9645c8
fancy.pdf https://github.com/matplotlib/matplotlib/pull/17231/files#diff-d68b9bd7a7804a1ab4a2251c52cbd8f0dc9a9a7ff5a2e645c345c76006f62284
fancy.png https://github.com/matplotlib/matplotlib/pull/17231/files#diff-1946bae45eed991e6087047c47d54d6fe80d6330450fbd4be6ea9576259e9201
fancy.svg https://github.com/matplotlib/matplotlib/pull/17231/files#diff-1ef21761279775538fa7c2a19cbb1ebb14d99c555e6a5a3e02e9f178a3efdac8
test_axes.py https://github.com/matplotlib/matplotlib/pull/17231/files#diff-ef5144bd27a700deb760ef56ccf51dc6fcfe86723f9ffa84df7f024985bf3ee7
test_lines.py https://github.com/matplotlib/matplotlib/pull/17231/files#diff-34f31dc85b53912d1a4f3bf5e3eec1e545435323e40b6150268c47b28b390f0f
setup.cfg.template https://github.com/matplotlib/matplotlib/pull/17231/files#diff-3fea3c9278f0604dd9147ebb424348ca51bb5918b284066bdbc0741350a4cc0c
doc/api/lines_api.rsthttps://github.com/matplotlib/matplotlib/pull/17231/files#diff-c36934cc92e95fef72174075080b52bbd39b2680d7f2db52865680dc969c2b2c
View file https://github.com/cosama/matplotlib/blob/ae22f3d55b0891da5d58ad28fca229e1ed7437ba/doc/api/lines_api.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/17231/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-c36934cc92e95fef72174075080b52bbd39b2680d7f2db52865680dc969c2b2c
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-c36934cc92e95fef72174075080b52bbd39b2680d7f2db52865680dc969c2b2c
lib/matplotlib/axes/_axes.pyhttps://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
View file https://github.com/cosama/matplotlib/blob/ae22f3d55b0891da5d58ad28fca229e1ed7437ba/lib/matplotlib/axes/_axes.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/17231/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900
lib/matplotlib/lines.pyhttps://github.com/matplotlib/matplotlib/pull/17231/files#diff-be677869a88f58790f2387fb2ac0ae12e2e9610d7c7096e25d3087d5ed9645c8
View file https://github.com/cosama/matplotlib/blob/ae22f3d55b0891da5d58ad28fca229e1ed7437ba/lib/matplotlib/lines.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/17231/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/17231/files#diff-be677869a88f58790f2387fb2ac0ae12e2e9610d7c7096e25d3087d5ed9645c8
lib/matplotlib/tests/baseline_images/test_legend/fancy.pdfhttps://github.com/matplotlib/matplotlib/pull/17231/files#diff-d68b9bd7a7804a1ab4a2251c52cbd8f0dc9a9a7ff5a2e645c345c76006f62284
View file https://github.com/cosama/matplotlib/blob/ae22f3d55b0891da5d58ad28fca229e1ed7437ba/lib/matplotlib/tests/baseline_images/test_legend/fancy.pdf
Open in desktop https://desktop.github.com
lib/matplotlib/tests/baseline_images/test_legend/fancy.pnghttps://github.com/matplotlib/matplotlib/pull/17231/files#diff-1946bae45eed991e6087047c47d54d6fe80d6330450fbd4be6ea9576259e9201
View file https://github.com/cosama/matplotlib/blob/ae22f3d55b0891da5d58ad28fca229e1ed7437ba/lib/matplotlib/tests/baseline_images/test_legend/fancy.png
Open in desktop https://desktop.github.com
Reload?https://github.com/matplotlib/matplotlib/pull/17231/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/17231/files
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.