René's URL Explorer Experiment


Title: Replace C++ quad contouring code with use of ContourPy · Issue #22529 · matplotlib/matplotlib · GitHub

Open Graph Title: Replace C++ quad contouring code with use of ContourPy · Issue #22529 · matplotlib/matplotlib

X Title: Replace C++ quad contouring code with use of ContourPy · Issue #22529 · matplotlib/matplotlib

Description: I propose to remove the C++ quad contouring code that is in Matplotlib, which I originally wrote in 2014, and replace it with use of a new external dependency ContourPy. ContourPy is a new Python/C++ project that contains the original (2...

Open Graph Description: I propose to remove the C++ quad contouring code that is in Matplotlib, which I originally wrote in 2014, and replace it with use of a new external dependency ContourPy. ContourPy is a new Python/C...

X Description: I propose to remove the C++ quad contouring code that is in Matplotlib, which I originally wrote in 2014, and replace it with use of a new external dependency ContourPy. ContourPy is a new Python/C...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Replace C++ quad contouring code with use of ContourPy","articleBody":"I propose to remove the C++ quad contouring code that is in Matplotlib, which I originally wrote in 2014, and replace it with use of a new external dependency [ContourPy](https://github.com/contourpy/contourpy).\r\n\r\nContourPy is a new Python/C++ project that contains the original (2005) and current (2014) Matplotlib contouring algorithms as well as a new one that includes more features and is faster is many situations. The project primarily exists to allow other Python libraries to have access to contouring without having to have Matplotlib as a dependency, but I am happy to do the work required for it to be used by Matplotlib as well.\r\n\r\nThe new algorithm is a complete rewrite, taking the good features of the previous two algorithms and replacing the bad features with better ones. There are new features which may be of interest eventually, such as the `quad_as_tri` option which divides each full quad into 4 triangles for contouring purposes, and support for multithreading (high risk at the moment). The major difference is that it supports a number of different return types so that, for example, you can request Matplotlib `Path` kind codes or not.\r\n\r\nI recommend a conservative approach, which is to use the new algorithm but without any of the new features and using exactly the same return types that Matplotlib is used to. Later on we can look at those two areas which will give improved functionality and performance.\r\n\r\nThe changes for this can be done in a single PR (which I have waiting in the wings) as follows:\r\n1. Delete the three `src/_contour*` files and remove the `contour` section from `setupext.py`.\r\n2. Add the new dependency `contour\u003e=1` to `setup.py`, `environment.yml` and possibly other places in the CI config files.\r\n3. In `contour.py` change the import statement and creation of a `ContourGenerator` object. This changes only ~6 lines of code.\r\n4. Removing the tests of the internal contour API in `test_contour.py`.\r\n5. Baseline image changes.\r\n\r\nThe latter all occur because the new contouring algorithm returns exactly the same lines/polygons but not necessarily starting with the same point. The Agg backend renders polygons with 4+ points exactly the same regardless of starting point, but it renders triangles differently. This is a feature/bug of Agg which has been around for years.\r\n\r\nYour concerns should be ones of packaging and maintenance.\r\n\r\n## Packaging\r\n\r\nContourPy is written in C++11 and wrapped using [pybind11](https://github.com/pybind/pybind11). I don't use any C++ language features invented in the last 10+ years. Pybind11 is actively maintained and builds on all hardware/OS/Python version combinations. I have [PyPI wheels](https://pypi.org/project/contourpy/#files) available for all the hardware/OS/Python version combinations that Matplotlib supports plus a few others, all via `cibuildwheel`. There are [conda-forge](https://anaconda.org/conda-forge/contourpy) packages too.\r\n\r\nThe only runtime dependency is `numpy`.\r\n\r\n## Maintenance\r\n\r\nI am the only maintainer of ContourPy and I expect it will stay that way although obviously I would welcome contributions from others. My job (https://makepath.com/) is in the areas of visualisation and spatial algorithms and ContourPy sits firmly in both camps, and I have a remit to use, develop and support Open Source projects, so the short to medium term future of ContourPy is assured. I suppose the other comment here is that I am already the de facto maintainer of the Matplotlib C++ contouring and tricontouring algorithms that I wrote, but I can only recall fixing one bug in each over the last 8 and 12 years respectively, both just after initial release, so you should not have any particular concerns about the quality of my C++.\r\n\r\nIf you don't want to go ahead with this change and would prefer to keep the existing C++ code in Matplotlib then I am fine with this. I am also OK with the idea of using ContourPy but via the existing `mpl2014` algorithm (as I call it) which involves a PR with all the changes above except for the baseline image changes.","author":{"url":"https://github.com/ianthomas23","@type":"Person","name":"ianthomas23"},"datePublished":"2022-02-22T09:29:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/22529/matplotlib/issues/22529"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ca9da961-0872-6d72-45ec-a66ba3655497
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBD4A:1BD726:252ED9B:31CC0A2:6A5473BA
html-safe-noncefc8cc1e14f88637213c90ad19811dec759d0f2777748d403ce2a72495fa01b37
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDRBOjFCRDcyNjoyNTJFRDlCOjMxQ0MwQTI6NkE1NDczQkEiLCJ2aXNpdG9yX2lkIjoiNjUyMTA2MDU2Mzk3MTUwMzAzNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdecec4491c9251ad08db4f392908a9a6df02e24e6a2990b0f8f0b84cc4cb1c46
hovercard-subject-tagissue:1146660900
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/22529/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2f86ef40fd4a5330a27d797ebd3ef6bb0cc6b959c22e389f6cf95c86108cef5d/matplotlib/matplotlib/issues/22529
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2f86ef40fd4a5330a27d797ebd3ef6bb0cc6b959c22e389f6cf95c86108cef5d/matplotlib/matplotlib/issues/22529
og:image:altI propose to remove the C++ quad contouring code that is in Matplotlib, which I originally wrote in 2014, and replace it with use of a new external dependency ContourPy. ContourPy is a new Python/C...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameianthomas23
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
release6d28624802c2f7d9500239dd6870ed7031b7353b
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/22529#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F22529
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%2F22529
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/22529
Reloadhttps://github.com/matplotlib/matplotlib/issues/22529
Reloadhttps://github.com/matplotlib/matplotlib/issues/22529
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/22529
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/22529
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
#22567https://github.com/matplotlib/matplotlib/pull/22567
Replace C++ quad contouring code with use of ContourPyhttps://github.com/matplotlib/matplotlib/issues/22529#top
#22567https://github.com/matplotlib/matplotlib/pull/22567
topic: contourhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20contour%22
v3.6.0https://github.com/matplotlib/matplotlib/milestone/65
https://github.com/ianthomas23
ianthomas23https://github.com/ianthomas23
on Feb 22, 2022https://github.com/matplotlib/matplotlib/issues/22529#issue-1146660900
ContourPyhttps://github.com/contourpy/contourpy
pybind11https://github.com/pybind/pybind11
PyPI wheelshttps://pypi.org/project/contourpy/#files
conda-forgehttps://anaconda.org/conda-forge/contourpy
https://makepath.com/https://makepath.com/
topic: contourhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20contour%22
v3.6.0https://github.com/matplotlib/matplotlib/milestone/65
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.