Title: [BUG]: Screen scaling is not properly considered with Tk on X11 · Issue #31177 · matplotlib/matplotlib · GitHub
Open Graph Title: [BUG]: Screen scaling is not properly considered with Tk on X11 · Issue #31177 · matplotlib/matplotlib
X Title: [BUG]: Screen scaling is not properly considered with Tk on X11 · Issue #31177 · matplotlib/matplotlib
Description: NB I have found a workaround for this, see below Summary This graph import numpy as np import matplotlib.pyplot as plt X = np.linspace(0, 10*np.pi, 1000) Y = np.sin(X) fig, ax = plt.subplots() ax.plot(X, Y) plt.show() displays as Now cle...
Open Graph Description: NB I have found a workaround for this, see below Summary This graph import numpy as np import matplotlib.pyplot as plt X = np.linspace(0, 10*np.pi, 1000) Y = np.sin(X) fig, ax = plt.subplots() ax.p...
X Description: NB I have found a workaround for this, see below Summary This graph import numpy as np import matplotlib.pyplot as plt X = np.linspace(0, 10*np.pi, 1000) Y = np.sin(X) fig, ax = plt.subplots() ax.p...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31177
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG]: Screen scaling is not properly considered with Tk on X11","articleBody":"# NB I have found a workaround for this, see below\n\n### Summary\n\nThis graph\n```\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nX = np.linspace(0, 10*np.pi, 1000)\nY = np.sin(X)\n\nfig, ax = plt.subplots()\nax.plot(X, Y)\n\nplt.show()\n```\ndisplays as \n\n\u003cimg width=\"2560\" height=\"1600\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/04e9baf9-1642-4815-8150-db59c7a4885e\" /\u003e\n\nNow clearly the axis labels and everything inside the matplotlib window is not being scaled like the rest of the OS, which makes the numbers etc. very hard to read!\n\nAny ideas?\nWhat strategies can I use to debug the issue?\n\n### Proposed fix\n\n```\nyalihupokn@zoqu-endiman:~/Nextcloud/mp$ uname -a\nLinux zoqu-endiman 6.18.10-402.asahi.fc42.aarch64+16k #1 SMP PREEMPT_DYNAMIC Sat Feb 14 20:56:50 UTC 2026 aarch64 GNU/Linux\nyalihupokn@zoqu-endiman:~/Nextcloud/mp$ cat /etc/os-release \nNAME=\"Fedora Linux Asahi Remix\"\nVERSION=\"42 (Forty Two [Adams])\"\nRELEASE_TYPE=stable\nID=fedora-asahi-remix\nID_LIKE=fedora\nVERSION_ID=42\nVERSION_CODENAME=\"adams\"\nPRETTY_NAME=\"Fedora Linux Asahi Remix 42 (Forty Two [Adams])\"\nANSI_COLOR=\"0;38;2;60;110;180\"\nLOGO=fedora-logo-icon\nCPE_NAME=\"cpe:/o:fedoraproject:fedora-asahi-remix:42\"\nDEFAULT_HOSTNAME=\"fedora\"\nHOME_URL=\"https://fedora-asahi-remix.org/\"\nDOCUMENTATION_URL=\"https://docs.fedoraproject.org/en-US/fedora-asahi-remix/\"\nSUPPORT_URL=\"https://discussion.fedoraproject.org/c/neighbors/asahi/asahi-help/94\"\nBUG_REPORT_URL=\"https://bugzilla.redhat.com/\"\nREDHAT_BUGZILLA_PRODUCT=\"Fedora\"\nREDHAT_BUGZILLA_PRODUCT_VERSION=42\nREDHAT_SUPPORT_PRODUCT=\"Fedora\"\nREDHAT_SUPPORT_PRODUCT_VERSION=42\nVARIANT=\"KDE Plasma Desktop Edition\"\nVARIANT_ID=kde\nyalihupokn@zoqu-endiman:~/Nextcloud/mp$ \n```\n\n[UPDATE]\n\n`strace -e trace=openat ./t.py \u0026\u003e log.txt`\n\n[log.txt](https://github.com/user-attachments/files/25413705/log.txt)\n\n# Workaround\n\n##### [UPDATE 2]\n\nFixed it 🎉 (Documentation reference: https://matplotlib.org/stable/Matplotlib.pdf#page=1930)\n\n###### Steps to reproduce\n\n```\n. /home/yalihupokn/venv-for-matplotlib/.venv/bin/activate\nuv pip install pyqt6 pyside6\n```\nAdded line `matplotlib.use('QtAgg')` before `plt.show()`\n\n###### Final result\n\n\u003cimg width=\"2560\" height=\"1600\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/fe9f9040-52b0-4c39-8793-75b77b66eca0\" /\u003e","author":{"url":"https://github.com/SuperCowProducts","@type":"Person","name":"SuperCowProducts"},"datePublished":"2026-02-19T10:53:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/31177/matplotlib/issues/31177"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:33d641ca-2b90-5220-92de-d0744b740756 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD98:21407A:761340:9F3B4C:6A53043B |
| html-safe-nonce | 9d4d2740f9bd4fa134eda74e8ab37703b580a53f9408fbf993c4ccbae5d8c227 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDk4OjIxNDA3QTo3NjEzNDA6OUYzQjRDOjZBNTMwNDNCIiwidmlzaXRvcl9pZCI6IjE1NzA0NzQwMDA2NTk5NzMxNzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ece7706845c7b08b19735a50c67e2751c8829bb5745871d18503f1a4f4a009cb |
| hovercard-subject-tag | issue:3962289855 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/31177/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7b9b646a85b9cfc4064b2014bcac139d578ec5340aeee5baa84fda099f2746b6/matplotlib/matplotlib/issues/31177 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7b9b646a85b9cfc4064b2014bcac139d578ec5340aeee5baa84fda099f2746b6/matplotlib/matplotlib/issues/31177 |
| og:image:alt | NB I have found a workaround for this, see below Summary This graph import numpy as np import matplotlib.pyplot as plt X = np.linspace(0, 10*np.pi, 1000) Y = np.sin(X) fig, ax = plt.subplots() ax.p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SuperCowProducts |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width