René's URL Explorer Experiment


Title: Qt4Agg backend changes figure size · Issue #9913 · matplotlib/matplotlib · GitHub

Open Graph Title: Qt4Agg backend changes figure size · Issue #9913 · matplotlib/matplotlib

X Title: Qt4Agg backend changes figure size · Issue #9913 · matplotlib/matplotlib

Description: Edit: Note that this issue is also still present with Qt5Agg and matplotlib 3.0.1 Showing a figure with Qt4Agg backend changes the figure size. This is observed with Windows 8.1, python 2.7, matplotlib 2.1. import matplotlib matplotlib.u...

Open Graph Description: Edit: Note that this issue is also still present with Qt5Agg and matplotlib 3.0.1 Showing a figure with Qt4Agg backend changes the figure size. This is observed with Windows 8.1, python 2.7, matplo...

X Description: Edit: Note that this issue is also still present with Qt5Agg and matplotlib 3.0.1 Showing a figure with Qt4Agg backend changes the figure size. This is observed with Windows 8.1, python 2.7, matplo...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Qt4Agg backend changes figure size","articleBody":"Edit: Note that this issue is also still present with Qt5Agg and matplotlib 3.0.1\r\n\r\nShowing a figure with Qt4Agg backend changes the figure size. This is observed with Windows 8.1, python 2.7, matplotlib 2.1.\r\n\r\n```\r\nimport matplotlib\r\nmatplotlib.use(\"Qt4Agg\")\r\nimport matplotlib.pyplot as plt\r\n\r\nfig, ax = plt.subplots()\r\nax.plot([1,2,4])\r\n\r\ndef update(evt):\r\n    print(fig.get_size_inches())\r\n       \r\ncid = fig.canvas.mpl_connect(\"key_press_event\", update)\r\n\r\nprint(fig.get_size_inches())\r\nplt.show()\r\n```\r\nThe original figure is `[ 6.4  4.8]`. After the figure is drawn (and in this case you press a key), it is only `[ 6.4   4.78]`.  \r\nOne could argue that this is only a small amount, but saving the figure from within the event loop now gives a different figure size of the saved figure. To make this more obvious, consider the following code which saves a new image after each press of space.\r\n\r\n```\r\nimport matplotlib\r\nmatplotlib.use(\"Qt4Agg\")\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nclass NextPlotter(object):\r\n    def __init__(self, fig, func, n):\r\n        self.__dict__.update(locals())\r\n        self.i = 0\r\n        self.cid = self.fig.canvas.mpl_connect(\"key_press_event\", self.adv)\r\n        \r\n    def adv(self, evt):\r\n        if evt.key == \" \" and self.i \u003c self.n:\r\n            self.func(self.i)\r\n            self.i+=1\r\n        elif self.i \u003e= self.n:\r\n            plt.close(\"all\")\r\n\r\n# Create data\r\npos = range(8)\r\nscatterdata = np.random.normal(0, 5, size=(50,len(pos)))\r\n\r\n#Create plot\r\nfig, ax = plt.subplots()\r\nax.axis([-10,10,-10,10])\r\nscatter = ax.scatter([], [], c=\"crimson\", s=60)\r\n\r\n# define updating function\r\ndef update(i):\r\n    print(\"++ update \" + str(i))\r\n    scatter.set_offsets(np.c_[pos,scatterdata[i,:]])\r\n    fig.canvas.draw()\r\n    print(fig.get_size_inches())\r\n    plt.savefig(\"plot_{i}.png\".format(i=i))\r\n    print(fig.get_size_inches())\r\n\r\n# instantiate NextPlotter; press \u003cspace\u003e to advance to the next image        \r\nc = NextPlotter(fig, update, len(scatterdata))\r\n\r\nplt.show()\r\n```\r\nresulting in \r\n![nextplotter_qtagg3](https://user-images.githubusercontent.com/23121882/33517240-c672a602-d780-11e7-90ae-593c89e736ce.gif)\r\n\r\nIs this a problem of PyQt4? Can anyone reproduce this outside of Windows 8? ","author":{"url":"https://github.com/ImportanceOfBeingErnest","@type":"Person","name":"ImportanceOfBeingErnest"},"datePublished":"2017-12-02T15:53:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":20},"url":"https://github.com/9913/matplotlib/issues/9913"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:401a7374-1ede-f272-4947-40479daf202e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9E20:33B84F:4ADCB:65DC8:6A53D336
html-safe-nonce62918e5bd0c723dade0e3ae20c0cacb30f32a733dfc81a216dfc3ba2789e94af
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTIwOjMzQjg0Rjo0QURDQjo2NURDODo2QTUzRDMzNiIsInZpc2l0b3JfaWQiOiI0MTY5NDI3OTk3ODgyMDQ1MjM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaccd61d77b13f58863957c6f36eb942e6b33145c0ab3ed60342d88bfcb8ff8dda5
hovercard-subject-tagissue:278693871
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/9913/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7d15f71a00b97ff4f699b7dd5a8926c52686ffb99d7058f173693f3bb0d75505/matplotlib/matplotlib/issues/9913
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7d15f71a00b97ff4f699b7dd5a8926c52686ffb99d7058f173693f3bb0d75505/matplotlib/matplotlib/issues/9913
og:image:altEdit: Note that this issue is also still present with Qt5Agg and matplotlib 3.0.1 Showing a figure with Qt4Agg backend changes the figure size. This is observed with Windows 8.1, python 2.7, matplo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameImportanceOfBeingErnest
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
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/9913#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F9913
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%2F9913
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/9913
Reloadhttps://github.com/matplotlib/matplotlib/issues/9913
Reloadhttps://github.com/matplotlib/matplotlib/issues/9913
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/9913
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/9913
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
Qt4Agg backend changes figure sizehttps://github.com/matplotlib/matplotlib/issues/9913#top
GUI: Qthttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22GUI%3A%20Qt%22
OS: Microsofthttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22OS%3A%20Microsoft%22
status: needs confirmationhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22status%3A%20needs%20confirmation%22
https://github.com/ImportanceOfBeingErnest
ImportanceOfBeingErnesthttps://github.com/ImportanceOfBeingErnest
on Dec 2, 2017https://github.com/matplotlib/matplotlib/issues/9913#issue-278693871
https://user-images.githubusercontent.com/23121882/33517240-c672a602-d780-11e7-90ae-593c89e736ce.gif
GUI: Qthttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22GUI%3A%20Qt%22
OS: Microsofthttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22OS%3A%20Microsoft%22
status: needs confirmationhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22status%3A%20needs%20confirmation%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.