René's URL Explorer Experiment


Title: Align x and y labels between axes by jklymak · Pull Request #9652 · matplotlib/matplotlib · GitHub

Open Graph Title: Align x and y labels between axes by jklymak · Pull Request #9652 · matplotlib/matplotlib

X Title: Align x and y labels between axes by jklymak · Pull Request #9652 · matplotlib/matplotlib

Description: PR Summary Aligns the x and y labels automatically at draw time. Responds to windows resize. works w/ tight_layout (and presumably #9082) Example: import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt import numpy as np import matplotlib.gridspec as gridspec for after in [True, False]: fig = plt.figure(tight_layout=True) gs = gridspec.GridSpec(2, 2) ax = fig.add_subplot(gs[0,:]) ax.plot(np.arange(0, 1e6, 1000)) ax.set_ylabel('Test') for i in range(2): ax = fig.add_subplot(gs[1, i]) ax.set_ylabel('Booooo') ax.set_xlabel('Hello') if i == 0: for tick in ax.get_xticklabels(): tick.set_rotation(45) if after: # fig.align_ylabels() # fig.align_xlabels() fig.align_labels() # do both x and y fig.savefig('After.png') else: fig.savefig('Before.png') Before After 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 Check righthand/top labels align_labels() align titles: Done but #9498 needs to be merged for it to work (or matter) ;-)

Open Graph Description: PR Summary Aligns the x and y labels automatically at draw time. Responds to windows resize. works w/ tight_layout (and presumably #9082) Example: import matplotlib matplotlib.use('Qt5Agg'...

X Description: PR Summary Aligns the x and y labels automatically at draw time. Responds to windows resize. works w/ tight_layout (and presumably #9082) Example: import matplotlib matplotlib.use('Qt5Agg...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:2b48ba0d-8451-fb30-7de4-9137e6adef85
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8402:3C3A12:CD5AE:118D87:6A567753
html-safe-nonce752c4a312d30406cd223cb00f1203c586bffab7ab167029950289d4bc843e497
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDAyOjNDM0ExMjpDRDVBRToxMThEODc6NkE1Njc3NTMiLCJ2aXNpdG9yX2lkIjoiOTE0ODUzNDE0NzkzODAzNjAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf7c086ec15cb961b7831c1b894bdc0fdbca0768fefd1c06c3575b36c770ac7ab
hovercard-subject-tagpull_request:150045071
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/9652/files
twitter:imagehttps://avatars.githubusercontent.com/u/1562854?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1562854?s=400&v=4
og:image:altPR Summary Aligns the x and y labels automatically at draw time. Responds to windows resize. works w/ tight_layout (and presumably #9082) Example: import matplotlib matplotlib.use('Qt5Agg'...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None19b5ee9431dcfce15ab4b001d626e4e3a6ba1acb7be814813a52bbebd9a86ef5
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
releaseafc01ffdb045f4ff81c6122091366ade7b6166b7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/pull/9652/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F9652%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%2F9652%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/9652/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/9652/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/9652/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/9652/files
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/9652/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 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
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
dstansbyhttps://github.com/dstansby
matplotlib:masterhttps://github.com/matplotlib/matplotlib/tree/master
jklymak:alignxylabelshttps://github.com/jklymak/matplotlib/tree/alignxylabels
Conversation 39 https://github.com/matplotlib/matplotlib/pull/9652
Commits 4 https://github.com/matplotlib/matplotlib/pull/9652/commits
Checks 0 https://github.com/matplotlib/matplotlib/pull/9652/checks
Files changed https://github.com/matplotlib/matplotlib/pull/9652/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/9652/files
Align x and y labels between axes https://github.com/matplotlib/matplotlib/pull/9652/files#top
Show all changes 4 commits https://github.com/matplotlib/matplotlib/pull/9652/files
ce91095 ENH: aligning x and y labels across axes jklymak Oct 31, 2017 https://github.com/matplotlib/matplotlib/pull/9652/commits/ce91095fb477d0e87145f9353c31e1cb673abb6a
a8f72f3 Refinements jklymak Jan 12, 2018 https://github.com/matplotlib/matplotlib/pull/9652/commits/a8f72f3e8f515b61ec31a86e0268ce4b410ff961
17d1025 Changed from lists to Grouper jklymak Jan 13, 2018 https://github.com/matplotlib/matplotlib/pull/9652/commits/17d1025ba9bab4e37390aa8ab8633a2f30aee776
2d47811 DOC: some more comments jklymak Jan 13, 2018 https://github.com/matplotlib/matplotlib/pull/9652/commits/2d478111637d2ed1541d8ab9e99e66c9d9872e10
Clear filters https://github.com/matplotlib/matplotlib/pull/9652/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/9652/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/9652/files
2017-11-1_figure_align_labels.rst https://github.com/matplotlib/matplotlib/pull/9652/files#diff-a7654afc04012c8597676b985e8ed8af9bdd075c6d1c909357ea69b1d483c856
align_labels_demo.py https://github.com/matplotlib/matplotlib/pull/9652/files#diff-c2f0e08cb61f298a2ac899a321abe35a97aac04c167af5ec1ad548a2e4e1a459
axis.py https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
figure.py https://github.com/matplotlib/matplotlib/pull/9652/files#diff-01b0c7a8c4445ae46a3c055ace167e99f59dcd54dbf04c84bca2132914d2f8df
gridspec.py https://github.com/matplotlib/matplotlib/pull/9652/files#diff-5fe0a531eb6f4d8ecbea1c817251fd13792b67735a96e07263655d69df73b34a
figure_align_labels.pdf https://github.com/matplotlib/matplotlib/pull/9652/files#diff-a86a4a2766a383e4b4c6dca02760fbbfaaa05ab2cb41426d9f1607ea8874e687
figure_align_labels.png https://github.com/matplotlib/matplotlib/pull/9652/files#diff-1e7143242ce70bb99076ad92ff47ad8f243e897bc46789df4de7e79e96df2f26
figure_align_labels.svg https://github.com/matplotlib/matplotlib/pull/9652/files#diff-6855a8d2e677d2011e7fad05b1f1c93bb6b964bb2d46373ba9d701ed1f777e2f
test_figure.py https://github.com/matplotlib/matplotlib/pull/9652/files#diff-7c50aec0865ef6fceff6a5cb00d4b7e57d396ecbcd3546e5fb494aabed99af33
doc/users/next_whats_new/2017-11-1_figure_align_labels.rsthttps://github.com/matplotlib/matplotlib/pull/9652/files#diff-a7654afc04012c8597676b985e8ed8af9bdd075c6d1c909357ea69b1d483c856
View file https://github.com/jklymak/matplotlib/blob/2d478111637d2ed1541d8ab9e99e66c9d9872e10/doc/users/next_whats_new/2017-11-1_figure_align_labels.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/9652/{{ revealButtonHref }}
examples/subplots_axes_and_figures/align_labels_demo.pyhttps://github.com/matplotlib/matplotlib/pull/9652/files#diff-c2f0e08cb61f298a2ac899a321abe35a97aac04c167af5ec1ad548a2e4e1a459
View file https://github.com/jklymak/matplotlib/blob/2d478111637d2ed1541d8ab9e99e66c9d9872e10/examples/subplots_axes_and_figures/align_labels_demo.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/9652/{{ revealButtonHref }}
lib/matplotlib/axis.pyhttps://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
View file https://github.com/jklymak/matplotlib/blob/2d478111637d2ed1541d8ab9e99e66c9d9872e10/lib/matplotlib/axis.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/9652/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-04227e6d4900298b309bddab2e848da8cc638da2913c64b5dcf0d800ba2a0c16
lib/matplotlib/figure.pyhttps://github.com/matplotlib/matplotlib/pull/9652/files#diff-01b0c7a8c4445ae46a3c055ace167e99f59dcd54dbf04c84bca2132914d2f8df
View file https://github.com/jklymak/matplotlib/blob/2d478111637d2ed1541d8ab9e99e66c9d9872e10/lib/matplotlib/figure.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/9652/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-01b0c7a8c4445ae46a3c055ace167e99f59dcd54dbf04c84bca2132914d2f8df
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-01b0c7a8c4445ae46a3c055ace167e99f59dcd54dbf04c84bca2132914d2f8df
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-01b0c7a8c4445ae46a3c055ace167e99f59dcd54dbf04c84bca2132914d2f8df
https://github.com/matplotlib/matplotlib/pull/9652/files#diff-01b0c7a8c4445ae46a3c055ace167e99f59dcd54dbf04c84bca2132914d2f8df
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/9652/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.