René's URL Explorer Experiment


Title: Width/height ratios not obeyed in complex plots with extra space · Issue #221 · proplot-dev/proplot · GitHub

Open Graph Title: Width/height ratios not obeyed in complex plots with extra space · Issue #221 · proplot-dev/proplot

X Title: Width/height ratios not obeyed in complex plots with extra space · Issue #221 · proplot-dev/proplot

Description: Description Setting share=0 in plot.subplots leads to (some) axes having non-equal width. Steps to reproduce Before using share=0 everything looks good, the axes in the middle row have the same width: import numpy as np import proplot as...

Open Graph Description: Description Setting share=0 in plot.subplots leads to (some) axes having non-equal width. Steps to reproduce Before using share=0 everything looks good, the axes in the middle row have the same wid...

X Description: Description Setting share=0 in plot.subplots leads to (some) axes having non-equal width. Steps to reproduce Before using share=0 everything looks good, the axes in the middle row have the same wid...

Opengraph URL: https://github.com/proplot-dev/proplot/issues/221

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Width/height ratios not obeyed in complex plots with extra space","articleBody":"### Description\r\n\r\nSetting `share=0` in `plot.subplots` leads to (some) axes having non-equal width.\r\n\r\n### Steps to reproduce\r\n\r\nBefore using `share=0` everything looks good, the axes in the middle row have the same width:\r\n```python\r\nimport numpy as np\r\nimport proplot as plot\r\n\r\n# simple function to extract axis widths\r\ndef get_widths(axs):\r\n    return np.array([ax.get_position().bounds[2] for ax in axs])\r\n\r\n# plot geometry\r\narray = [[1, 1, 1, 2, 2, 2],\r\n         [3, 3, 4, 4, 5, 5],\r\n         [6, 6, 7, 7, 8, 8]]\r\n\r\n# axis in the second row is the reference\r\nfig, axs = plot.subplots(array, hratios=(2, 2, 2.5), ref=5)\r\n\r\n# check the widths\r\nwidths = get_widths(axs[2:5])\r\nprint(widths)\r\nprint('all widths equal:', (widths == widths[0]).all())\r\n```\r\nThis gives the following figure:\r\n\u003cimg src=https://user-images.githubusercontent.com/8452354/90953460-0c2b8100-e46c-11ea-9799-e8c48087135b.png width=\"350pix\"\u003e\r\n\r\nand prints:\r\n```\r\n[0.29239766 0.29239766 0.29239766]\r\nall widths equal: True\r\n```\r\n\r\nHowever, when I add `share=0` to the `plot.subplots` - the middle axis in the second row shrinks more than the outer axes:\r\n```python\r\nfig, axs = plot.subplots(array, hratios=(2, 2, 2.5), ref=5, share=0)\r\n```\r\n\u003cimg src=https://user-images.githubusercontent.com/8452354/90953508-51e84980-e46c-11ea-97d7-415ca35cdfdd.png width=\"350pix\"\u003e\r\n\r\nchecking the widths, I have to call `fig.canvas.draw()` to get the actual widths, because if the code below is run is the same code cell as the previous I first get widths that are not compatible width what I see in the figure:\r\n```python\r\nwidths = get_widths(axs[2:5])\r\nprint(widths)\r\nprint('all widths equal:', (widths == widths[0]).all())\r\n\r\nfig.canvas.draw()\r\nwidths = get_widths(axs[2:5])\r\nprint(widths)\r\nprint('all widths equal:', (widths == widths[0]).all())\r\n```\r\n\r\nwhich prints:\r\n```\r\n[0.26041667 0.26041667 0.26041667]\r\nall widths equal: False\r\n[0.2920774 0.2616831 0.2920774]\r\nall widths equal: False\r\n```\r\nonly the widths captured after figure redraw align with what I see in the figure.\r\nBut that is not so surprising, the actual issue are the non-equal widths of the axes in the second and third row.\r\n\r\n### Proplot version\r\n\r\n```\r\n0.6.4\r\n```\r\n\r\nPS. Thanks for the great package, makes creating complex multi-panel figures much easier!","author":{"url":"https://github.com/mmagnuski","@type":"Person","name":"mmagnuski"},"datePublished":"2020-08-22T09:55:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/221/proplot/issues/221"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d99e28bb-0da2-25bb-9300-76f82ba66e2c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA83C:1BE2E:C48B:FDAB:697CD64C
html-safe-noncecb7737f8d42e27b2d7ee9e7b6c96a76dc384969e4845d0367a7574f92f0db160
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODNDOjFCRTJFOkM0OEI6RkRBQjo2OTdDRDY0QyIsInZpc2l0b3JfaWQiOiI0OTk1NTE2NjM0NTc2NTA4NDkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7590179d722a798b652719507fb34e272ed83eb32ab9ad14eb0f8456f27c32a0
hovercard-subject-tagissue:683968967
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/proplot-dev/proplot/221/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6f17ef82d604d4440b262f7ecad49b602cede415fb598da0b38a1182075ace7e/proplot-dev/proplot/issues/221
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6f17ef82d604d4440b262f7ecad49b602cede415fb598da0b38a1182075ace7e/proplot-dev/proplot/issues/221
og:image:altDescription Setting share=0 in plot.subplots leads to (some) axes having non-equal width. Steps to reproduce Before using share=0 everything looks good, the axes in the middle row have the same wid...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemmagnuski
hostnamegithub.com
expected-hostnamegithub.com
None025b9e10ca829bdfe9cd8da6b55d0d4f68b8cf9a01e684b2843bf11849d7d948
turbo-cache-controlno-preview
go-importgithub.com/proplot-dev/proplot git https://github.com/proplot-dev/proplot.git
octolytics-dimension-user_id108025793
octolytics-dimension-user_loginproplot-dev
octolytics-dimension-repository_id113293661
octolytics-dimension-repository_nwoproplot-dev/proplot
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id113293661
octolytics-dimension-repository_network_root_nwoproplot-dev/proplot
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
release4a049c8dd66e29bfcb546b5f1ef4ceabb3f7501d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/proplot-dev/proplot/issues/221#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fproplot-dev%2Fproplot%2Fissues%2F221
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2Fproplot-dev%2Fproplot%2Fissues%2F221
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=proplot-dev%2Fproplot
Reloadhttps://github.com/proplot-dev/proplot/issues/221
Reloadhttps://github.com/proplot-dev/proplot/issues/221
Reloadhttps://github.com/proplot-dev/proplot/issues/221
proplot-dev https://github.com/proplot-dev
proplothttps://github.com/proplot-dev/proplot
Notifications https://github.com/login?return_to=%2Fproplot-dev%2Fproplot
Fork 97 https://github.com/login?return_to=%2Fproplot-dev%2Fproplot
Star 1.1k https://github.com/login?return_to=%2Fproplot-dev%2Fproplot
Code https://github.com/proplot-dev/proplot
Issues 88 https://github.com/proplot-dev/proplot/issues
Pull requests 7 https://github.com/proplot-dev/proplot/pulls
Discussions https://github.com/proplot-dev/proplot/discussions
Actions https://github.com/proplot-dev/proplot/actions
Projects 0 https://github.com/proplot-dev/proplot/projects
Security 0 https://github.com/proplot-dev/proplot/security
Insights https://github.com/proplot-dev/proplot/pulse
Code https://github.com/proplot-dev/proplot
Issues https://github.com/proplot-dev/proplot/issues
Pull requests https://github.com/proplot-dev/proplot/pulls
Discussions https://github.com/proplot-dev/proplot/discussions
Actions https://github.com/proplot-dev/proplot/actions
Projects https://github.com/proplot-dev/proplot/projects
Security https://github.com/proplot-dev/proplot/security
Insights https://github.com/proplot-dev/proplot/pulse
New issuehttps://github.com/login?return_to=https://github.com/proplot-dev/proplot/issues/221
New issuehttps://github.com/login?return_to=https://github.com/proplot-dev/proplot/issues/221
Width/height ratios not obeyed in complex plots with extra spacehttps://github.com/proplot-dev/proplot/issues/221#top
bughttps://github.com/proplot-dev/proplot/issues?q=state%3Aopen%20label%3A%22bug%22
enhancementhttps://github.com/proplot-dev/proplot/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/mmagnuski
https://github.com/mmagnuski
mmagnuskihttps://github.com/mmagnuski
on Aug 22, 2020https://github.com/proplot-dev/proplot/issues/221#issue-683968967
https://user-images.githubusercontent.com/8452354/90953460-0c2b8100-e46c-11ea-9799-e8c48087135b.png
https://user-images.githubusercontent.com/8452354/90953508-51e84980-e46c-11ea-97d7-415ca35cdfdd.png
bughttps://github.com/proplot-dev/proplot/issues?q=state%3Aopen%20label%3A%22bug%22
enhancementhttps://github.com/proplot-dev/proplot/issues?q=state%3Aopen%20label%3A%22enhancement%22
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.