René's URL Explorer Experiment


Title: Make contour and contourf color assignments consistent. by efiring · Pull Request #11412 · matplotlib/matplotlib · GitHub

Open Graph Title: Make contour and contourf color assignments consistent. by efiring · Pull Request #11412 · matplotlib/matplotlib

X Title: Make contour and contourf color assignments consistent. by efiring · Pull Request #11412 · matplotlib/matplotlib

Description: PR Summary This is derived from, and replaces, #8834. Selection of contour levels is now the same for contour and contourf; previously, for contour, levels outside the data range were deleted. (Exception: if no contour levels are found within the data range, the levels attribute is replaced with a list holding only the minimum of the data range.) When contour is called with levels specified as a target number rather than a list, and the 'extend' kwarg is used, the levels are now chosen such that some data typically will fall in the extended range. When contour is called with a LogNorm or a LogLocator, it will now select colors using the geometric mean rather than the arithmetic mean of the contour levels. Closes #10572. An unfortunate side effect is that many test images have to be changed because they happen to use colored line contours generated via the minimal call to contour for which the behavior is changed by this PR. PR Checklist Has Pytest style unit tests Code is PEP 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 This is derived from, and replaces, #8834. Selection of contour levels is now the same for contour and contourf; previously, for contour, levels outside the data range were deleted. (Ex...

X Description: PR Summary This is derived from, and replaces, #8834. Selection of contour levels is now the same for contour and contourf; previously, for contour, levels outside the data range were deleted. (Ex...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ec30c4bb-7e98-28ab-cb46-fbc6c165bdfc
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA32C:3026A5:10D0A95:189DDB3:6A577355
html-safe-noncea55c676f514c2cc5d8913febe4907385961ffed7d5b9328f054ae7e697327feb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzJDOjMwMjZBNToxMEQwQTk1OjE4OUREQjM6NkE1NzczNTUiLCJ2aXNpdG9yX2lkIjoiNDg5OTk0MTMxNTc2MzQ2NzA5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac930cac1671640a4182c11af4c6add083949b75c13d99255b2a287ae93e80dbdc
hovercard-subject-tagpull_request:193852175
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/11412/files
twitter:imagehttps://avatars.githubusercontent.com/u/85125?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/85125?s=400&v=4
og:image:altPR Summary This is derived from, and replaces, #8834. Selection of contour levels is now the same for contour and contourf; previously, for contour, levels outside the data range were deleted. (Ex...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98
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
releasec0ca805e53f128ba1f966be1d3ccd81d0d1959c7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/pull/11412/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F11412%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%2F11412%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/11412/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/11412/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/11412/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/files
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/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
jklymakhttps://github.com/jklymak
matplotlib:masterhttps://github.com/matplotlib/matplotlib/tree/master
efiring:contour_colorshttps://github.com/efiring/matplotlib/tree/contour_colors
Conversation 15 https://github.com/matplotlib/matplotlib/pull/11412
Commits 1 https://github.com/matplotlib/matplotlib/pull/11412/commits
Checks 0 https://github.com/matplotlib/matplotlib/pull/11412/checks
Files changed https://github.com/matplotlib/matplotlib/pull/11412/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/files
Make contour and contourf color assignments consistent. https://github.com/matplotlib/matplotlib/pull/11412/files#top
Show all changes 1 commit https://github.com/matplotlib/matplotlib/pull/11412/files
3abe218 ENH: improve contourf color autoscaling efiring Jun 28, 2017 https://github.com/matplotlib/matplotlib/pull/11412/commits/3abe21872cf528c3623d342a5ea8f398e9b5ad5b
Clear filters https://github.com/matplotlib/matplotlib/pull/11412/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/files
2018-06-09-EF-contour_levels.rst https://github.com/matplotlib/matplotlib/pull/11412/files#diff-8acc4875cea467a843a7d969ad7b818188df9d6140a7fd391b4c70eb8a97a710
contour.py https://github.com/matplotlib/matplotlib/pull/11412/files#diff-b3f136a845ae5b7383fbc2be280c64af12352a6583ace9658cc4f6e2479df4a3
contour_colorbar.pdf https://github.com/matplotlib/matplotlib/pull/11412/files#diff-cc4c24838e1dd7e2da699063be7dd5109869e693812fbd8e24e258037a038c8c
contour_colorbar.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-f29da672f22a2f0ad2b88c59da591461e5fbe236876211e94524b8ccc02f182a
contour_colorbar.svg https://github.com/matplotlib/matplotlib/pull/11412/files#diff-37a493ea7ab1331d85b9a4290cc819812d5302e430c572527723df8b0fd50443
contour_hatching.pdf https://github.com/matplotlib/matplotlib/pull/11412/files#diff-dcbf723f3808dceb9881f51d298712cede29f81617723577209c7cf35cc5e350
contour_hatching.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-65fb418bab1c9e074f2a2751d21ff11d810d210bcbc0b41e008d333c0790c54c
contour_hatching.svg https://github.com/matplotlib/matplotlib/pull/11412/files#diff-6a081b6220b27abd58e2f63c2b2018c1c099429e50b3812d3d859d895283ea30
contour_datetime_axis.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-7ff8e84854f1b10078dbde7b9fcc51ecb69540cf8a97bfc64e53ded074364d58
contour_labels_size_color.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-1d9b49eea4296d5546b2562cc5580bef84ddb28b85ceb656adf6e1f0f9776441
contour_log_extension.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-4148fc142c6f8d397624fc6a7d6cd78d55f176ff04f11c59fd0c75747f986dc5
contour_manual_labels.pdf https://github.com/matplotlib/matplotlib/pull/11412/files#diff-af2c3d77f1d8a3ee964011f43d9c36323413d90b3d9b71506a45af31b66a18fb
contour_manual_labels.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-757b4608eaf6c6082b9b796fd8ad964e15097a9d9cefc4943f52071ab17264d1
contour_manual_labels.svg https://github.com/matplotlib/matplotlib/pull/11412/files#diff-8055ff421bf07e6f17951e40c77112f943db6db04f3b86ab5ecb3b8b9505860d
contour_test_label_transforms.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-f20626ad4b5d1cf5b3e057fdc8bb56906186228e0a3957b9a1b2bdcc78578dc2
line_collection_dashes.pdf https://github.com/matplotlib/matplotlib/pull/11412/files#diff-c6f664aad45c9ea8df5e20b05d4dbdb018158d4142e7aaf2d019f93dff249553
line_collection_dashes.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-46b3a072c8ab29e4acb4c608cf14e84b33348ce770353e9705aaa6cdabf9f4cd
line_collection_dashes.svg https://github.com/matplotlib/matplotlib/pull/11412/files#diff-8d702caadf006bf8645d13dbd8ad0bd50f64506ec8b88904c8075333cb62907c
collection.pdf https://github.com/matplotlib/matplotlib/pull/11412/files#diff-0e42214521fd98baba8067cd9f1db951dfe90c15e459e6790497cca0b202af6d
collection.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-f3a3553b846a2686e5454fb1a5cc04fde02540dcdeaad8f8a9fa3acd1aaa084d
collection.svg https://github.com/matplotlib/matplotlib/pull/11412/files#diff-73fb3229cb021ae51d16ae8fe83d605feca3d67feccd435f370124f2dd008029
test_axes.py https://github.com/matplotlib/matplotlib/pull/11412/files#diff-ef5144bd27a700deb760ef56ccf51dc6fcfe86723f9ffa84df7f024985bf3ee7
test_contour.py https://github.com/matplotlib/matplotlib/pull/11412/files#diff-56298727b96c2c05776fa59f72ae5f189bb16d046d5452cf8379a1fe55906bdc
test_lines.py https://github.com/matplotlib/matplotlib/pull/11412/files#diff-34f31dc85b53912d1a4f3bf5e3eec1e545435323e40b6150268c47b28b390f0f
test_patheffects.py https://github.com/matplotlib/matplotlib/pull/11412/files#diff-6d81cd305692263c35f8cf2bcff7315367bf80a693cf66ab1be9a328009c3c18
axes3d.py https://github.com/matplotlib/matplotlib/pull/11412/files#diff-a67656224bfb26dc6de0a0f89e398cd6999377d1482aca3e867ee550ff05be57
contour3d.pdf https://github.com/matplotlib/matplotlib/pull/11412/files#diff-f05cb28409cc956ce6703cc8796996b0c7821b2e8c97d44b811e421c9c13d81a
contour3d.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-1ee2810bffe8b7a96e99bc34bf0c120520546c5059a737f22f57a6acb0eb232c
contour3d.svg https://github.com/matplotlib/matplotlib/pull/11412/files#diff-44220985a103dc3a14bd38c3ed6e63ccaaf161a8d70b1113fe3b2ae7737b117b
tricontour.png https://github.com/matplotlib/matplotlib/pull/11412/files#diff-432397003135e47dbfd45332f7528665fa90a5fd8eb7c81b5a466f6db20a39fc
test_mplot3d.py https://github.com/matplotlib/matplotlib/pull/11412/files#diff-92e80a964dd888ffff51f54d8acd8189c645c989d947d9819d5c46b213f60ad4
doc/api/next_api_changes/2018-06-09-EF-contour_levels.rsthttps://github.com/matplotlib/matplotlib/pull/11412/files#diff-8acc4875cea467a843a7d969ad7b818188df9d6140a7fd391b4c70eb8a97a710
View file https://github.com/efiring/matplotlib/blob/3abe21872cf528c3623d342a5ea8f398e9b5ad5b/doc/api/next_api_changes/2018-06-09-EF-contour_levels.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/11412/{{ revealButtonHref }}
lib/matplotlib/contour.pyhttps://github.com/matplotlib/matplotlib/pull/11412/files#diff-b3f136a845ae5b7383fbc2be280c64af12352a6583ace9658cc4f6e2479df4a3
View file https://github.com/efiring/matplotlib/blob/3abe21872cf528c3623d342a5ea8f398e9b5ad5b/lib/matplotlib/contour.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/11412/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/11412/files#diff-b3f136a845ae5b7383fbc2be280c64af12352a6583ace9658cc4f6e2479df4a3
jklymakhttps://github.com/jklymak
Jun 12, 2018https://github.com/matplotlib/matplotlib/pull/11412/files#r194743667
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/files
efiringhttps://github.com/efiring
Jul 2, 2018https://github.com/matplotlib/matplotlib/pull/11412/files#r199520170
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/files
https://github.com/matplotlib/matplotlib/pull/11412/files#diff-b3f136a845ae5b7383fbc2be280c64af12352a6583ace9658cc4f6e2479df4a3
https://github.com/matplotlib/matplotlib/pull/11412/files#diff-b3f136a845ae5b7383fbc2be280c64af12352a6583ace9658cc4f6e2479df4a3
https://github.com/matplotlib/matplotlib/pull/11412/files#diff-b3f136a845ae5b7383fbc2be280c64af12352a6583ace9658cc4f6e2479df4a3
jklymakhttps://github.com/jklymak
Jun 12, 2018https://github.com/matplotlib/matplotlib/pull/11412/files#r194744810
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/files
efiringhttps://github.com/efiring
Jul 2, 2018https://github.com/matplotlib/matplotlib/pull/11412/files#r199522422
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/files
https://github.com/matplotlib/matplotlib/pull/11412/files#diff-b3f136a845ae5b7383fbc2be280c64af12352a6583ace9658cc4f6e2479df4a3
lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.pdfhttps://github.com/matplotlib/matplotlib/pull/11412/files#diff-cc4c24838e1dd7e2da699063be7dd5109869e693812fbd8e24e258037a038c8c
View file https://github.com/efiring/matplotlib/blob/3abe21872cf528c3623d342a5ea8f398e9b5ad5b/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.pdf
Open in desktop https://desktop.github.com
lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.pnghttps://github.com/matplotlib/matplotlib/pull/11412/files#diff-f29da672f22a2f0ad2b88c59da591461e5fbe236876211e94524b8ccc02f182a
View file https://github.com/efiring/matplotlib/blob/3abe21872cf528c3623d342a5ea8f398e9b5ad5b/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.png
Open in desktop https://desktop.github.com
Reload?https://github.com/matplotlib/matplotlib/pull/11412/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/11412/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.