Title: Docs: default backend is not always `"agg"` (e.g., if X11 is working) · Issue #19813 · matplotlib/matplotlib · GitHub
Open Graph Title: Docs: default backend is not always `"agg"` (e.g., if X11 is working) · Issue #19813 · matplotlib/matplotlib
X Title: Docs: default backend is not always `"agg"` (e.g., if X11 is working) · Issue #19813 · matplotlib/matplotlib
Description: Problem One may get the impression that "agg" is the default backend from reading There are three ways to configure your backend: The rcParams["backend"] (default: 'agg') parameter in your matplotlibrc file The MPLBACKEND environment var...
Open Graph Description: Problem One may get the impression that "agg" is the default backend from reading There are three ways to configure your backend: The rcParams["backend"] (default: 'agg') parameter in your matplotl...
X Description: Problem One may get the impression that "agg" is the default backend from reading There are three ways to configure your backend: The rcParams["backend"] (default: 'agg'...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/19813
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Docs: default backend is not always `\"agg\"` (e.g., if X11 is working)","articleBody":"### Problem\r\n\r\nOne may get the impression that `\"agg\"` is the default backend from reading\r\n\u003e There are three ways to configure your backend:\r\n\u003e 1. The `rcParams[\"backend\"]` (default: `'agg'`) parameter in your `matplotlibrc` file\r\n\u003e 2. The `MPLBACKEND` environment variable\r\n\u003e 3. The function `matplotlib.use()`\r\n\r\nhttps://matplotlib.org/stable/tutorials/introductory/usage.html#selecting-a-backend\r\n\r\nSo, not having a `matplotlibrc` nor `MPLBACKEND`, I would expect that `\"agg\"` is default. However, with `DISPLAY` set and an X11 server running, I get\r\n```\r\nuser@host:~/cia\u003e xeyes; echo $?; python -c \"import matplotlib as mpl; print(mpl.get_backend())\"\r\n0\r\nTkAgg\r\n```\r\n\r\nOnly after closing the X11 server, everything is as expected:\r\n```\r\nuser@host:~/cia\u003e xeyes; echo $?; python -c \"import matplotlib as mpl; print(mpl.get_backend())\"\r\nError: Can't open display: localhost:12.0\r\n1\r\nagg\r\n```\r\n\r\n### Suggested Improvement\r\n\r\n- Explain that an interactive backend is selected by default if available.\r\n- Make sure people find this information when searching for \"TkAgg\" (in case someone looks for this when trying to understand why they get what I observe).\r\n- Remove \"(default: `'agg'`)\" from `rcParams[\"backend\"]` (because it's not always correct)\r\n","author":{"url":"https://github.com/bersbersbers","@type":"Person","name":"bersbersbers"},"datePublished":"2021-03-29T21:03:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/19813/matplotlib/issues/19813"}
| 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:793e7df2-0aa1-f220-3b07-df083203f185 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A7A4:2961A1:360FC:44E22:6A5255BE |
| html-safe-nonce | 84a55333ca544b3336416bf610a16476e6ab2dac3a5eba6179ae3648fae408f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0E0OjI5NjFBMTozNjBGQzo0NEUyMjo2QTUyNTVCRSIsInZpc2l0b3JfaWQiOiI2NDEzMTM4MzgyMzk5MTAwMzUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0ba75768dec344140a6edd57f52d4e6bd3fb53c4eef074425ef948c6a664eaf9 |
| hovercard-subject-tag | issue:843807818 |
| 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/19813/issue_layout |
| twitter:image | https://opengraph.githubassets.com/16e465ee451e18ed14c59f0c5e40a452007438f3d347a3ed8ee29938bb787e7e/matplotlib/matplotlib/issues/19813 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/16e465ee451e18ed14c59f0c5e40a452007438f3d347a3ed8ee29938bb787e7e/matplotlib/matplotlib/issues/19813 |
| og:image:alt | Problem One may get the impression that "agg" is the default backend from reading There are three ways to configure your backend: The rcParams["backend"] (default: 'agg') parameter in your matplotl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bersbersbers |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width